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: <st...@ta...> - 2005-02-14 00:49:19
|
Hi Chris, Chris Dennett wrote: > 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. I had to get around this too and my solution was to move the necessary absolute path into the java realm. So for SDL.dll I use System.load() to get the VM to load the native lib. You should be able to make a reasonable assumption about where your app is installed at runtime or you can infer it from classpath/user.dir/etc. This mean you should be able to generate that absolute path just before loading the native SDL lib in the java code. I haven't yet explored whether this would also be a preferable way of loading sdljava.dll though, but do let us know how you get on :) Cheers, Steph -- ================================================================ Stephane Meslin-Weber Email: st...@ta... Software Engineer Web: http://odonata.tangency.co.uk ================================================================ |