Re: [sdljava-users] Eclipse success
Status: Beta
Brought to you by:
ivan_ganza
From: <st...@ta...> - 2005-01-26 16:26:45
|
St=E9phane Meslin-Weber wrote: > After two days of very slow progress, I've finally managed to get the > test scripts for sdljava to run happily from Eclipse - my next hurdle = is > to get Odonata to use the fruits of this labour across Eclipse project= s... I've managed to get an SDL window up from within Odonata code... Unfortunately I've had to modify some of the auto-generated SWIG files to do so. I'll explain in more detail why this was necessary: - Odonata is a drop-in replacement for native AWT peers, this requires it to be loaded on the bootclasspath of the JVM to override some key java.awt.* classes. - If Odonata uses sdljava, sdljava also needs to be on the bootclasspath= . - It seems that at least on the Sun JVM (1.4.2_05) native libraries present on the java.library.path aren't picked up by classes on the bootclasspath (makes sense I suppose) - but then again, nor are they picked up in any other location than sun.boot.library.path (and modifications to this either have no effect or understandably break the = JVM) To get around these limitations, I use System.load() with an absolute path to the libraries. The various static blocks in sdljava (in SDLMain,= and SWIG_SDLMainJNI) to be removed to allow me to do the native lib loading manually. (I haven't yet used the other SDL_* libraries). I obviously don't want to mess with generated files and the presence of the static blocks is completely understandable; when sdljava is loaded outside the bootclasspath. With the above in mind, I'd like to propose a runtime property that if present disables those static blocks so java -Dsdljava.bootclasspath would allow people to manually load native libraries. Suggestions are welcome :) Best Regards, Steph -- =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Stephane Meslin-Weber Email: st...@ta... Software Engineer Web: http://odonata.tangency.co.uk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D |