Mike wrote:
Perhaps a bit offtopic, but my company has asked me to try and get a desktop java app we use/are developing here running under Linux. You'd think, being written in Java, that it'd just be a case of installing the JVM and running it. Unfortunately, because Java is rather poor at desktop apps, they've used a load of windows extensions via JNI to try and make it integrate better.
That means, the only solution is probably to run a JVM under Wine (short of rewriting all the native code, which they don't want to do). Now, I tried the Sun JRE, and it wasn't happy. I expect HotSpot does some wierd stuff under the covers. So I'm wondering if anybody has walked this road before, and if there are any other JVMs that might work better under Wine?
What version of Java does the app require?
I wonder if perhaps some older Sun JREs run better on Wine than hotspot does. I haven't tried any, but who knows, it might be worth trying. - Dan
What version of Java does the app require?
Unfortunately 1.4
I wonder if perhaps some older Sun JREs run better on Wine than hotspot does. I haven't tried any, but who knows, it might be worth trying.
The 1.2 version at least starts, but apparently it's not sufficient for this app.
<sigh> And I thought java was supposed to make stuff more portable :/
- Dan
Unfortunately, because Java is rather poor at desktop apps, they've used a load of windows extensions via JNI to try and make it integrate better.
<sigh> And I thought java was supposed to make stuff more portable :/
Java? Yes. MS/Windows? No. :)
Good luck.
Fabi
It seems that if WinVer is set to nt40, java runs happily (although not without issues of course).
Uwe found it was due to threading some time ago, I think wine stores something at the wrong place. I still get warnings about stack guards, but they don't seem to cause issues.
Next problem - java appears to use DirectDraw? It wipes out the screen contents in the same way QuickTime did when using DirectDraw, which obviously gets in the way of working with the app :)
More debugging needed....
youpi youpi yay ! --- Mike Hearn m.hearn@signal.qinetiq.com a écrit :
It seems that if WinVer is set to nt40, java runs happily (although not without issues of course).
Uwe found it was due to threading some time ago, I think wine stores something at the wrong place. I still get warnings about stack guards, but they don't seem to cause issues.
even when running hello world or CUI class ? :)
Next problem - java appears to use DirectDraw? It wipes out the screen contents in the same way QuickTime did when using DirectDraw, which obviously gets in the way of working with the app :)
More debugging needed....
===== Sylvain Petreolle (spetreolle at users dot sourceforge dot net) ICQ #170597259 No more War !
"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".
For the Law of Oil and Fire, Im an European that lives in France. For all my Brothers and friends, Im a human living on Earth.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
even when running hello world or CUI class ? :)
Hello World is OK, it's mainly graphical stuff that goes wrong :)
On Wednesday 26 March 2003 17:59, Mike Hearn wrote:
Next problem - java appears to use DirectDraw? It wipes out the screen contents in the same way QuickTime did when using DirectDraw, which obviously gets in the way of working with the app :)
Yes. Swing uses DirectDraw. But you can disable direct draw usage with the -Dsun.java2d.noddraw option. (That is running program with 'java -Dsun.java2d.noddraw main.Class' )
I had to use this option when I had a S3 Virge DX (graphic card), since it had glitches with ddraw.
Regards Zsolt
Yes. Swing uses DirectDraw. But you can disable direct draw usage with the -Dsun.java2d.noddraw option. (That is running program with 'java -Dsun.java2d.noddraw main.Class' )
I had to use this option when I had a S3 Virge DX (graphic card), since it had glitches with ddraw.
Thanks, I didn't know about that option, very useful! :)
Quick investigation led to me to conclude that fixing this bug is not trivial, a proper clipper implementation is required. It'd be nice to fix it sometime, I don't think it's especially hard. Just a matter of hours.
Do you have to put options on the command line or change environment ? It complains that it cannot found the classess for me, even for the 'hello world'.
[syl@snoop Java]$ cat PremierProgramme.java //Premier programme Java class PremierProgramme { public static void main (String[] arg) { System.out.println("Ca marche!"); } } [syl@snoop Java]$ ls -l PremierProgramme.* -rwxr-xr-x 1 syl wine 467 mar 27 07:13 PremierProgramme.class -rwxr-xr-x 1 syl wine 153 mar 27 07:13 PremierProgramme.java [syl@snoop Java]$ java PremierProgramme Ca marche! [syl@snoop Java]$ wine java PremierProgramme Java HotSpot(TM) Client VM warning: Attempt to allocate stack guard pages failed. fixme:console:SetConsoleCtrlHandler (0x7800f585,1) - no error checking or testing yet fixme:console:SetConsoleCtrlHandler (0x6d3d369f,1) - no error checking or testing yet Exception in thread "main" java.lang.NoClassDefFoundError: PremierProgramme
===== Sylvain Petreolle (spetreolle at users dot sourceforge dot net) ICQ #170597259 No more War !
"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".
For the Law of Oil and Fire, Im an European that lives in France. For all my Brothers and friends, Im a human living on Earth.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
This sounds like a caps issue, java is very sensitive to that kind of thing. It all works for me, but I'm using JAR files.
On Thu, 2003-03-27 at 18:58, Sylvain Petreolle wrote:
Do you have to put options on the command line or change environment ? It complains that it cannot found the classess for me, even for the 'hello world'.
[syl@snoop Java]$ cat PremierProgramme.java //Premier programme Java class PremierProgramme { public static void main (String[] arg) { System.out.println("Ca marche!"); } } [syl@snoop Java]$ ls -l PremierProgramme.* -rwxr-xr-x 1 syl wine 467 mar 27 07:13 PremierProgramme.class -rwxr-xr-x 1 syl wine 153 mar 27 07:13 PremierProgramme.java [syl@snoop Java]$ java PremierProgramme Ca marche! [syl@snoop Java]$ wine java PremierProgramme Java HotSpot(TM) Client VM warning: Attempt to allocate stack guard pages failed. fixme:console:SetConsoleCtrlHandler (0x7800f585,1) - no error checking or testing yet fixme:console:SetConsoleCtrlHandler (0x6d3d369f,1) - no error checking or testing yet Exception in thread "main" java.lang.NoClassDefFoundError: PremierProgramme
===== Sylvain Petreolle (spetreolle at users dot sourceforge dot net) ICQ #170597259 No more War !
"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".
For the Law of Oil and Fire, Im an European that lives in France. For all my Brothers and friends, Im a human living on Earth.
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
--- Mike Hearn mike@theoretic.com a écrit : Could you give steps to create and run it, because my java knowledge is old, and I didnt manage to create it, even with the native jdk :/ :))
This sounds like a caps issue, java is very sensitive to that kind of thing. It all works for me, but I'm using JAR files.
===== Sylvain Petreolle (spetreolle at users dot sourceforge dot net) ICQ #170597259 No more War !
"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".
For the Law of Oil and Fire, Im an European that lives in France. For all my Brothers and friends, Im a human living on Earth.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Hmm, there are guides on java.sun.com about how to make JAR files, but if "wine java" was looking in the wrong place, I suspect you need to run it like this:
wine -- "c:\java\bin\java" FooClass
I expect Wine is mangling the pathname of the current directory into the argument, passing -- should stop it from doing that.
Googling, I found how to prepare a jar properly, now it works. Thanks. --- Mike Hearn mike@theoretic.com a écrit :
This sounds like a caps issue, java is very sensitive to that kind of thing. It all works for me, but I'm using JAR files.
===== Sylvain Petreolle (spetreolle at users dot sourceforge dot net) ICQ #170597259 No more War !
"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".
For the Law of Oil and Fire, Im an European that lives in France. For all my Brothers and friends, Im a human living on Earth.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
--- Mike Hearn mike@theoretic.com a écrit :
This sounds like a caps issue, java is very sensitive to that kind of thing. It all works for me, but I'm using JAR files.
Enabling +file I found this :
If I run 'java PremierProgramme' into C:\space (/c/space), it tries to open C:\space\space\PremierProgramme.class If the class is moved as C:\space\space\PremierProgramme.class, it works.
If runned from E:\ (/home/tmp-wine) it wants to open E:\tmp-wine\tmp-wine\PremierProgramme.class !!
===== Sylvain Petreolle (spetreolle at users dot sourceforge dot net) ICQ #170597259 No more War !
"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".
For the Law of Oil and Fire, Im an European that lives in France. For all my Brothers and friends, Im a human living on Earth.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Here is another problem : it doesnt works until you use a native msvcrt. Strange thing to notice, it tries to call an unimplemented function in msvcrt... ... and the debugger isnt called at all !!
Java HotSpot(TM) Client VM warning: Attempt to allocate stack guard pages failed . fixme:msvcrt:MSVCRT_signal (2 0x6d3d360d):stub fixme:seh:EXC_RtlRaiseException call to unimplemented function msvcrt.dll._wfull path
fixme:imagehlp:SymGetOptions (): stub fixme:imagehlp:SymSetOptions (0x00000010): stub --- Mike Hearn m.hearn@signal.qinetiq.com a écrit :
It seems that if WinVer is set to nt40, java runs happily (although not without issues of course).
===== Sylvain Petreolle (spetreolle at users dot sourceforge dot net) ICQ #170597259 No more War !
"What if tomorrow the War could be over ?" Morpheus, in "Reloaded".
For the Law of Oil and Fire, Im an European that lives in France. For all my Brothers and friends, Im a human living on Earth.
___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
"Sylvain" == Sylvain Petreolle spetreolle@yahoo.fr writes:
Sylvain> Here is another problem : it doesnt works until you use a Sylvain> native msvcrt. Strange thing to notice, it tries to call an Sylvain> unimplemented function in msvcrt... ... and the debugger isnt Sylvain> called at all !!
As soon as MSVCIRT (The C++ Stream library) comes into the play, we get the problem that MSVCIRT accesses internal structures in MSVCRT...
And I guess that Java uses C++...
Bye