Thread: [sdljava-users] Eclipse success
Status: Beta
Brought to you by:
ivan_ganza
From: <st...@ta...> - 2005-01-26 13:18:39
|
Hi Everyone, After getting everything working fine under mingw I wanted to be able to use sdljava (CVS) in the same dev environment as I use for Odonata. (Eclipse 3.1 on WinXP) 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 projects... Many thanks for starting this project up again! Best Regards, Steph -- ================================================================ Stephane Meslin-Weber Email: st...@ta... Software Engineer Web: http://odonata.tangency.co.uk ================================================================ |
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 |
From: Ivan Z. G. <iva...@ya...> - 2005-01-27 00:07:18
|
Greetings! I'm glad you were able to get things working. Regarding the problems=20 you had were these to do with eclipse or the way sdljava is complied,=20 used? If you have suggestions which could have made it easier for you=20 please let me know. I've checked out the Odonata site and I really like the idea! -Ivan/ St=E9phane Meslin-Weber wrote: > Hi Everyone, > > After getting everything working fine under mingw I wanted to be able=20 > to use sdljava (CVS) in the same dev environment as I use for Odonata.=20 > (Eclipse 3.1 on WinXP) > > After two days of very slow progress, I've finally managed to get the=20 > test scripts for sdljava to run happily from Eclipse - my next hurdle=20 > is to get Odonata to use the fruits of this labour across Eclipse=20 > projects... > > Many thanks for starting this project up again! > > Best Regards, > > Steph > |
From: Ivan Z. G. <iva...@ya...> - 2005-01-27 04:34:36
|
The mail list server is acting funny so I didn't actually get sent your=20 mail but I see it in the archive. I will add a switch such that if the System property=20 "sdljava.bootclasspath" is defined no calls will be made to=20 System.loadLibrary to load the libs. Loading the libs will be up to the=20 users of the library in this case. Let me know if you find anything else that would be helpfull. Cheers, -Ivan/ 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... =20 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. =20 I"ll explain in more detail why this was necessary: =20 - 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. =20 - If Odonata uses sdljava, sdljava also needs to be on the bootclasspath. =20 - 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) =20 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). =20 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. =20 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. =20 Suggestions are welcome :) =20 Best Regards, =20 Steph St=E9phane Meslin-Weber wrote: > Hi Everyone, > > After getting everything working fine under mingw I wanted to be able=20 > to use sdljava (CVS) in the same dev environment as I use for Odonata.=20 > (Eclipse 3.1 on WinXP) > > After two days of very slow progress, I've finally managed to get the=20 > test scripts for sdljava to run happily from Eclipse - my next hurdle=20 > is to get Odonata to use the fruits of this labour across Eclipse=20 > projects... > > Many thanks for starting this project up again! > > Best Regards, > > Steph > |