.jar File

Hi, I am trying to run a .jar file, and I have both JDK and JRE installed. This is the error I keep getting.

jonathan@linux-d0g9:~> cd Downloads
jonathan@linux-d0g9:~/Downloads> java -jar RSBot2.jar
jonathan@linux-d0g9:~/Downloads> 
jonathan@linux-d0g9:~/Downloads> java -f -jar RSBot2.jar
Unrecognized option: -f
Could not create the Java virtual machine.
jonathan@linux-d0g9:~/Downloads> 

Thanks

Hello!

If you by JRE mean the official Sun Java and by JDK the ‘Java-openjdk’ you could try uninstalling one of the packages, + plugins etc, and try again. ‘Java-openjdk’ is an open source alternative to the Sun Java package. Maybe it causes some kind of confusion within your system having both installed?

Thnx for the reply!

I uninstalled JDK, and Sun Java. I still have the same error. I have no idea what to do. :’(

On 2010-12-18 18:36, Rabbitdog wrote:
>
> Thnx for the reply!
>
> I uninstalled JDK, and Sun Java. I still have the same error. I have
> no idea what to do. :’(

You can not uninstall both and expect java to run… You need one.

Use “update-alternatives” to tell the system which java is the default one.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

I’m sorry…I meant to say I have JDK, installed, and it doesn’t work. I do not however have the official Sun Java installed.

Rabbitdog wrote:

>
> I’m sorry…I meant to say I have JDK, installed, and it doesn’t work. I
> do not however have the official Sun Java installed.
>
>
The reported error “Could not create the Java virtual machine” is most of
the time related to java memory settings which are too high for the machine.
How much RAM does the machine have?

Can you try to run your jar with


java -Xmx64M -jar RSBot2.jar

and report what happens?


openSUSE 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.5 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | KDE 4.5 | Quadro FX
3600M | 4GB Ram