I am trying to run my .jar
file on a linux server.
These are the commands I'm running:
JAVA_HOME=/app/local/opt/jdk/packages/jdk1.6.0_30/
export PATH=$JAVA_HOME/bin:$PATH
cd folder
nohup java -jar program.jar &
When ran on Friday, this was working perfectly. However, today I am getting:
Unrecognised option: - Could not create the Java virtual machine.
In my nohup.out
If I run java -v
after setting the path I get the same problem. Can anyone suggest anything? Really confused about this.
Thanks for any help on this.
At 'java Properties" window select the Compatibility tab and below the Settings pane, check the box Run this program as an administrator. Then click Apply and OK. 5. Finally, start the program that cannot run because of the "Could Not Create the Java Virtual Machine" error and see if the problem persists.
public abstract class VirtualMachineError extends Error. Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
“Could not find a valid Java virtual machine to load. You may need to reinstall a supported Java virtual machine.” To fix, you need to insert the Java JRE bin folder location in to the Path system environment variable.
Usually, when we get this kind of exception ("Unrecognised option" which causes the "Could not create the Java virtual machine"), the JVM displays the unrecognized option, like this:
Unrecognised option: -[option details] Could not create the Java virtual machine.
the fact that you have no details makes it seem as though you just have a space (" ") in your command.
Take a look again to make sure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With