pd1980
2010-May-24 00:32 UTC
[Wine] Need Help debugging a Java based windows application to run
Hi All, I am trying to run a java based communication client developed for winidows to run on Ubuntu/Wine. First I tried installing the app without having JRE under Wine, it halted with an error while installing JRE. So, I installed JRE separately under wine and then the application. It installed correctly. Now, when I run the application, it starts (I can see it under the process list) and then crashes (the process disappears). I tried running the app through command line using the following. export WINEDEBUG=1 ; wine /path/tp/app.exe Here is the output. fixme:reg:GetNativeSystemInfo (0x327800) using GetSystemInfo() USER.DIR=Z:\home\androit USER.DIR=Z:\home\androit java.lang.NullPointerException at java.io.File.<init>(Unknown Source) at com.company.app.findCurrentVersion(Unknown Source) at com.company.app.main(Unknown Source) at org.eclipse.equinox.launcher.Main.run(Unknown Source) Can you please help me with this? What do I need? Thanks, PD
James McKenzie
2010-May-24 01:30 UTC
[Wine] Need Help debugging a Java based windows application to run
pd1980 wrote:> Hi All, > > I am trying to run a java based communication client developed for winidows to run on Ubuntu/Wine. > > First I tried installing the app without having JRE under Wine, it halted with an error while installing JRE. So, I installed JRE separately under wine and then the application. It installed correctly. > > Now, when I run the application, it starts (I can see it under the process list) and then crashes (the process disappears). > > I tried running the app through command line using the following. > export WINEDEBUG=1 ; wine /path/tp/app.exe > > Here is the output. > > fixme:reg:GetNativeSystemInfo (0x327800) using GetSystemInfo() > USER.DIR=Z:\home\androit > USER.DIR=Z:\home\androit >This is a Java error that is coming from the lack of Eclipse support. You may need to install Eclipse for Windows...> java.lang.NullPointerException > at java.io.File.<init>(Unknown Source) > at com.company.app.findCurrentVersion(Unknown Source) > at com.company.app.main(Unknown Source) > at org.eclipse.equinox.launcher.Main.run(Unknown Source) >James McKenzie
Martin Gregorie
2010-May-24 11:16 UTC
[Wine] Need Help debugging a Java based windows application to run
On Sun, 2010-05-23 at 18:30 -0700, James McKenzie wrote:> pd1980 wrote: > > Hi All, > > > > I am trying to run a java based communication client developed for winidows to run on Ubuntu/Wine. > > > > First I tried installing the app without having JRE under Wine, it halted with an error while installing JRE. So, I installed JRE separately under wine and then the application. It installed correctly. > > > > Now, when I run the application, it starts (I can see it under the process list) and then crashes (the process disappears). > > > > I tried running the app through command line using the following. > > export WINEDEBUG=1 ; wine /path/tp/app.exe > > > > Here is the output. > > > > fixme:reg:GetNativeSystemInfo (0x327800) using GetSystemInfo() > > USER.DIR=Z:\home\androit > > USER.DIR=Z:\home\androit > > > This is a Java error that is coming from the lack of Eclipse support. > You may need to install Eclipse for Windows... > > java.lang.NullPointerException > > at java.io.File.<init>(Unknown Source) > > at com.company.app.findCurrentVersion(Unknown Source) > > at com.company.app.main(Unknown Source) > > at org.eclipse.equinox.launcher.Main.run(Unknown Source) > >Eclipse is not needed: java.io.File is a standard library class and is part of the JRE install. "app.exe" isn't a standard Java way of running an application: its probably some sort of wrapper round the "java JavaApplication" command that starts the JVM and it evidently didn't set JAVA_HOME or the classpath. To the OP: make sure your run-time environment sets the JAVA_HOME environment variable as explained in the installation notes for the JRE. That should allow your application to find the standard class libraries. The easiest way of doing this may be to use a wrapper script that sets JAVA_HOME and any other environment variables you need before it issues the "wine ...." command. Martin
pd1980
2010-May-24 22:25 UTC
[Wine] Re: Need Help debugging a Java based windows application to run
> probably some sort of wrapper round the "java JavaApplication" command > that starts the JVM and it evidently didn't set JAVA_HOME or the > classpath. > > To the OP: make sure your run-time environment sets the JAVA_HOME > environment variable as explained in the installation notes for the JRE. > That should allow your application to find the standard class libraries. > > The easiest way of doing this may be to use a wrapper script that sets > JAVA_HOME and any other environment variables you need before it issues > the "wine ...." command. > > > MartinThank you James. Thank you Martin. I tried the following on the command line, and it still gives the same error. Code: export JAVA_HOME=/home/pd/.wine/drive_c/Program\ Files/Java/jre6/bin/java; export WINEDEBUG=1 ; wine /path/tp/app.exe FYI, I installed jre into wine using the windows installer jre-6u20-windows-i586-s.exe. I also have java installed into my linux host separately. I am setting JAVA_HOME to bin/java located inside wine directory. Thanks, PD
Martin Gregorie
2010-May-24 23:51 UTC
[Wine] Need Help debugging a Java based windows application to run
> I tried the following on the command line, and it still gives the same error. > > Code: > > export JAVA_HOME=/home/pd/.wine/drive_c/Program\ Files/Java/jre6/bin/java; >You might try: export JAVA_HOME="C:\Program Files\Java\jre6" because JAVA_HOME should point to the root of the JRE version, not the JVM executable. In addition the Windows JRE and/or the wrapper EXE are going to expect an absolute path with that format and its not obvious to me whether wine will detect and modify absolute paths supplied as environment variables.> export WINEDEBUG=1 ; > wine /path/tp/app.exe > > > > > FYI, I installed jre into wine using the windows installer jre-6u20-windows-i586-s.exe. > I also have java installed into my linux host separately. > I am setting JAVA_HOME to bin/java located inside wine directory. >Have you checked that this is being overridden by the wine version? Using a simple script like this: #!/bin/bash export JAVA_HOME="C:\Program Files\Java\jre6" echo "JAVA_HOME=$JAVA_HOME" export WINEDEBUG=1 cd /path/tp wine app.exe will save you typing as you experiment. I suggest that you change the wine invocation since many Windows programs expect that their load directory is also their current working directory and I know nothing about the expectations of app.exe in this regard. Martin