Page 1 of 1
FATAL ERROR - can't find Java Virtual Machine on 7.0
Posted: Wed Jan 18, 2006 1:04 am
by cberrymd
I'm running Redhat EL4 and have been using <oXygen/> 6.x without problems. Updated to 7.0 and I get:
"FATAL ERROR
<oXygen/> requires a Java Virtual Machine..."
My java version is 1.4.2 which shouldn't be too old. What gives?
What's really weird is that this is not a very fatal FATAL ERROR since if I ignore it and click "continue" things seem to work fine.
Anybody know how to fix this?
Posted: Wed Jan 18, 2006 7:08 pm
by sorin_ristache
Hello,
If you change directory to the <oXygen/> install directory in a console and run:
does <oXygen/> start without any error message ?
Regards,
Sorin
Posted: Wed Jan 18, 2006 7:43 pm
by cberrymd
No. That is when I get the error message. After I ignore it <oXygen/> starts, but I don't expect that the JRE scripts will run properly.
Posted: Thu Jan 19, 2006 12:06 pm
by george
Hi,
The complete message is:
<oXygen/> requires a Java Virtual Machine from Sun Microsystems Inc.
Please either get the oXygen distribution that includes a JVM (if available for
your platform) or download a Java Runtime Environment (JRE) from Sun Microsystems Inc.:
http://java.sun.com/
So it means that you run oXygen with a JRE that is not from Sun and it is not supported. It may run without problems but you also may hit somtimes strange behaviour with that. It is recommended to use a JVM from Sun.
Best Regards,
George
Posted: Fri Jan 20, 2006 9:31 pm
by cberrymd
I have both ibm and Sun. How can I tell <oXygen/> where to find the Sun version it wants?
Posted: Mon Jan 23, 2006 7:47 pm
by sorin_ristache
Hello,
If you launch <oXygen/> from the shortcut created by the installer wizard you have to add a line like this:
Code: Select all
export app_java_home=/home/sorin/jdk1.5.0_05
in the oxygen7.0 startup script created by the installer, just before the line at the end of the script which begins with:
Code: Select all
"$app_java_home/bin/java" -client -Dinstall4j.jvmDir="$app_java_home" -Dinstall4j.appDir="$app_home"
Of course you have to use the path to the Sun JVM home dir installed on your machine instead of
/home/sorin/jdk1.5.0_05.
If you launch <oXygen/> using the
oxygen.sh script located in the <oXygen/> home dir with a command
you have to launch explicitly the Sun JVM by specifying the full path to the java executable in the last line of the script, something like:
Code: Select all
/home/sorin/jdk1.5.0_05/bin/java -Xmx256m "-Dcom.oxygenxml.editor.plugins.dir=$p/plugins" ...
or to make sure the
bin subdirectory of the Sun JVM home directory is specified in the
PATH environment variable before directories containing the executable of other JVMs.
Regards,
Sorin
Posted: Thu Jan 26, 2006 12:48 am
by cberrymd
That fixed it. Thanks!
Ran into the same problem on Windows when using the exe
Posted: Fri Jan 27, 2006 12:59 am
by sanderson
When I use the exe on Windows I occassionaly get the same errror. Using the batch file I never see the error.
Posted: Fri Jan 27, 2006 10:57 am
by sorin_ristache
Hello,
A Java virtual machine not from Sun Microsystems is found in the Windows registry before a Sun JVM. Using the
Windows installation kit which includes a JVM will ensure that <oXygen/> runs inside a Sun Microsystems JVM and that JVM will not interfere with any other applications on your machine. If you installed already the kit without JVM you have to set the home dir of a Sun JVM in the .ini file of the <oXygen/> executable as explained in
the second note on this page.
Regards,
Sorin
Posted: Wed Feb 01, 2006 2:56 am
by sanderson
Sorry, I'm actually getting a different error. My error is:
JNI exception: failed to create the Java VM.
In my oxygen7.0.ini I have the following
Code: Select all
JRE Path=c:\dev\tools\win32\jdk\jdk1.5.0_02\jre
and I still get the same error.
Posted: Wed Feb 01, 2006 12:37 pm
by sorin_ristache
Hello,
It seems the oxygen.bat script runs other Java virtual machine. Do you get any error if you edit the line which starts the Java virtual machine in the oxygen.bat script like this:
Code: Select all
c:\dev\tools\win32\jdk\jdk1.5.0_02\jre\bin\java -Xmx256m -cp %CP% ro.sync.exml.Oxygen %1 %2 %3 %4 %5 %6 %7
and start up <oXygen/> using this script ?
Regards,
Sorin
Posted: Fri Feb 03, 2006 8:17 am
by sanderson
The batch file never throws and error, only the executable.
Posted: Fri Feb 03, 2006 12:23 pm
by sorin_ristache
Hello sanderson,
sanderson wrote:When I use the exe on Windows I occassionaly get the same errror. Using the batch file I never see the error.
sanderson wrote:My error is:
JNI exception: failed to create the Java VM.
In my oxygen7.0.ini I have the following
Code: Select all
JRE Path=c:\dev\tools\win32\jdk\jdk1.5.0_02\jre
sorin wrote:Do you get any error if you edit the line which starts the Java virtual machine in the oxygen.bat script like this:
Code: Select all
c:\dev\tools\win32\jdk\jdk1.5.0_02\jre\bin\java -Xmx256m -cp %CP% ro.sync.exml.Oxygen %1 %2 %3 %4 %5 %6 %7
and start up <oXygen/> using this script ?
sanderson wrote:The batch file never throws and error, only the executable.
If oxygen.bat gives no error with
c:\dev\tools\win32\jdk\jdk1.5.0_02\jre\bin\java then oxygen.exe should also give no error with
JRE Path=c:\dev\tools\win32\jdk\jdk1.5.0_02\jre in oxygen.ini because it is the same Java virtual machine. The .exe is just a wrapper which starts up the Java virtual machine. Please post all the content of your oxygen7.0.ini file.
Regards,
Sorin
Error starting OxygenXML
Posted: Mon Apr 10, 2006 12:50 pm
by netman
sorin wrote:If oxygen.bat gives no error with c:\dev\tools\win32\jdk\jdk1.5.0_02\jre\bin\java then oxygen.exe should also give no error with JRE Path=c:\dev\tools\win32\jdk\jdk1.5.0_02\jre in oxygen.ini because it is the same Java virtual machine. The .exe is just a wrapper which starts up the Java virtual machine. Please post all the content of your oxygen7.0.ini file.
Regards,
Sorin
Hello. I have the same problem. When I start OxygenXML by exe file it gives me
Code: Select all
JNI exception: failed to create the JavaVM
error.
Code: Select all
[Display]
Splash Screen=C:\Program Files (x86)\Authoring\Oxygen 7.1\SplashScreen.bmp
[Java Runtime Environment]
JVM Type=favor_client
Virtual Machine Parameters=-Xmx40P -Dcom.oxygenxml.splash=false
Preferred versions=1.5;
Minimum Version=1.4.2
Main Class=ro.sync.exml.Oxygen
Maximum Version=any
JRE Path=C:\Program Files (x86)\Java\jre1.5.0_04
[Application]
Application Type=gui
Single Instance=yes
[Class Path]
Class Path=C:\Program Files (x86)\Authoring\Oxygen 7.1\lib\oxygen.jar;
whether I put JRE Path variable in ini-file or not
But oxygenxml.bat starts oxygen perfectly. What shoudl I do?
Code: Select all
C:\Program Files (x86)\Oxygen 7.1>rem C:\Program Files (x86)\Oxygen 7.1\ is expanded pathname of the current script under NT
C:\Program Files (x86)\Oxygen 7.1>SET CP="C:\Program Files (x86)\Oxygen 7.1\;C:\Program Files (x86)\Oxygen 7.1\/lib/oxygen.jar;C:\Program Files (x86)\Oxygen 7.1\/classes;"
C:\Program Files (x86)\Oxygen 7.1>java -Xmx256m -cp "C:\Program Files (x86)\Oxygen 7.1\;C:\Program Files (x86)\Oxygen 7.1\/lib/oxygen.jar;C:\Program Files (x86)\Oxygen 7.1\/classes;" ro.sync.exml.Oxygen
Time 3218
Posted: Mon Apr 10, 2006 2:23 pm
by sorin_ristache
Hello,
sanderson wrote:The batch file never throws and error, only the executable.
netman wrote:But oxygenxml.bat starts oxygen perfectly. What shoudl I do?
First we need to identify the problem. Unzip
this archive in the <oXygen/> install folder, C:\Program Files (x86)\Oxygen 7.1\ on your computer, and try to start <oXygen/> by double-clicking on each of the .exe files contained in the archive. Post here the effect of each one (<oXygen/> starts up normally, the same error message about the JNI exception, a different error message, etc). You will have to use the correct JRE path for your JRE installation in each .ini file corresponding to the .exe files. In your case that means replacing the line
Code: Select all
JRE Path=C:\Program Files\Java\jre1.5.0_06
with the line
Code: Select all
JRE Path=C:\Program Files (x86)\Java\jre1.5.0_04
in each .ini file before double-clicking on the corresponding .exe file. Other users obtaining the same JNI exception message are welcome to post their result here.
Regards,
Sorin
Posted: Mon Apr 10, 2006 2:24 pm
by sorin_ristache
Hello,
sanderson wrote:The batch file never throws and error, only the executable.
First we need to identify the problem. Unzip
this archive in the <oXygen/> install folder, C:\Program Files (x86)\Oxygen 7.1\ on your computer, and try to start <oXygen/> by double-clicking on each of the .exe files contained in the archive. Post here the effect of each one (<oXygen/> starts up normally, the same error message about the JNI exception, a different error message, etc). You will have to use the correct JRE path for your JRE installation in each .ini file corresponding to the .exe files. In your case that means replacing the line
Code: Select all
JRE Path=C:\Program Files\Java\jre1.5.0_06
with the line
Code: Select all
JRE Path=C:\Program Files (x86)\Java\jre1.5.0_04
in each .ini file before double-clicking on the corresponding .exe file. Other users obtaining the same JNI exception message are welcome to post their result here.
Regards,
Sorin
The same error
Posted: Mon Apr 10, 2006 5:13 pm
by netman
Every time error is the same error message about the JNI exception.
Could this possibly help
http://www.mytempdir.com/583909 ?
Posted: Mon Apr 10, 2006 5:59 pm
by sorin_ristache
Hello,
Thank you for the file. The problem is the maximum memory limit set for the Java virtual machine at startup which is too high on your machine. Please change the parameter -Xmx40P on the line Virtual Machine Parameters of the file [oXygen-install-folder]/oxygen7.1.ini to -Xmx1024m. That means 1 GB reserved for the heap space of the JVM and should be more than enough even for processing large documents in <oXygen/>. Then restart <oXygen/>. Anyway the launcher of version 7.2 will address this problem so that the JNI exception will not occur at startup.
Regards,
Sorin
Posted: Tue Apr 11, 2006 7:09 pm
by netman
Thanks, sorin now it works. But somehow _weird_, it start 1 in 2-5 times. It rest it's the same JNI exception error. Strange
Posted: Wed Apr 12, 2006 9:28 am
by sorin_ristache
Hello,
It is possible that the maximum heap limit is not the only problem on your computer. Please try with -Xmx512m and if you still get the JNI exception sometimes at startup it would be really helpful if you can close <oXygen/> and start up again but by double clicking on
OxygenMod0.exe which was included in
the zip archive instead of
oxygen7.1.exe which is launched by the Start menu shortcut.
Regards,
Sorin
Posted: Thu Apr 20, 2006 9:19 pm
by netman
When I put Xmx512M it starts fine without errors and when I leave Xmx1024M even by double clicking on OxygenMod0.exe it gives the same JNI error
Posted: Fri Apr 21, 2006 9:59 am
by sorin_ristache
Hello,
Delete the file OxygenMod0.log, leave -Xmx1024m in OxygenMod0.ini and double click again on OxygenMod0.exe. After that please send the generated OxygenMod0.log file to support at oxygenxml dot com. How much RAM memory do you have on the computer ?
Regards,
Sorin
Posted: Fri Apr 21, 2006 10:58 am
by netman
Posted: Fri Apr 21, 2006 11:09 am
by sorin_ristache
We will contact again the company which develops the Windows installer application in order to fix the problem and we will send the log file. Until then please use a lower value, for example -Xmx512m or -Xmx800m.
Thank you,
Sorin
Posted: Fri Apr 21, 2006 9:38 pm
by netman
Certanly. No problem. Just wanted to make your app better