Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java virtual machine launcher error: unable to access jarfile

Tags:

java

jar

I have downloaded a program to run on windows XP. According to the instructions, opening the .bat file that includes the command that calls the .jar file would be enough. Yet the program does not open. In a friend's computer the program does open.

I have set correctly the java-related environment variables. Java works fine. I have associated .jar files with java sdk.

When calling the command javaw -Xms128M -Xmx512M -jar filename.jar from cmd I get a java virtual machine launcher error: unable to access jarfile

Then I called the same command while being on the folder where the jar is, I have no error, but still the gui of the program does not open.

Any ideas?

On windows support the suggest unistalling and manually re-installing java, but java works fine in any other app.

like image 480
ingie Avatar asked Nov 04 '22 06:11

ingie


1 Answers

Try some of the following:

  1. Run directly from the .exe, so "C:...\jre\javaw.exe" -jar
  2. Try java -jar instead of javaw -jar.
  3. Try moving the file. It could be in a permissions sensitive directory.

Also, if the program was compiled using a 64-bit JDK, it might require a 64-bit JRE to run. In that case, you'd need to have a 64-bit OS/JRE to run it.

like image 171
George Avatar answered Nov 09 '22 12:11

George