Re: [sdljava-users] Problems with JavaSDL.. I've been trying for hours to get this to work.
Status: Beta
Brought to you by:
ivan_ganza
From: Ivan Z. G. <iva...@ya...> - 2005-02-14 01:52:41
|
Sounds like you got it working now. Thanks everyone for your help on the list. Regarding the portability -- it is just assumed that the SDL libraries can be resolved and are installed properly. Either present in c:\windows\system32 or in some other way configured so that the VM can locate the required libraries. I will update the INSTALL doc to be more clear on this aspect. If you were to actually ship a game created with sdljava then you would want to package up the SDL dll files you need (SDL, SDL_mixer, etc...) and have the installer for your game install these in the appropriate places. The users of your game should not have to deal with anything special. It should follow a standard install process like that for any game you buy off the shelf. Again I will update the documentation to be more clear and hopefully avoid this problem in the future. Please continue to send questions/comments/etc... -Ivan/ Chris Dennett wrote: > Great! The script now works! All I had to do is download SDL from > ww.libsdl.org and plonk SDL.dll into my c:\windows\system32 directory. > System.loadLibrary("sdljava"); is still required, however. I'll have a > go at using it, and use the mailing list again if any other problems > arise. > > By the way, I have doubts about the portability of this code. How many > users are going to mess around with all this if they want to play an > SDL Java game on their system? It seems that Java is a bit wrapped in > obfuscation when it comes to using C libraries. > > Regards, > Chris > > > Robert Schuster wrote: > >> Hi Chris, >> >> at first I wonder whether this can work: >> >> -Djava.library.path=D:/Programming/eclipse/plugins/org.eclipse.swt.win32_3.1.0/os/win32/x86 >> -Djava.library.path="d:/Java Code/sdljava/lib" >> >> You should put both absolute filenames in one argument. On Windows >> you separate usually with a ; >> It should look like: >> >> -Djava.library.path=D:/Programming/eclipse/plugins/org.eclipse.swt.win32_3.1.0/os/win32/x86;"d:/Java >> Code/sdljava/lib" >> >> --- >> >> Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\Java >> Code\sdljava\ >> lib\sdljava.dll: Can't find dependent libraries >> >> This one looks like sdljava's JNI library (sdljava.dll) cannot find >> SDL itself. If have no idea how you solve that on Windows elegantly. >> On GNU/Linux and other Unices we install libraries usually system >> wide which is less usually on Windows. >> As a workaround you can download SDL's DLLs from libsdl.org and put >> them in the same directory as sdljava.dll. >> >> >> cu >> Robert > > > |