How do I execute a jar file? I keep getting -jar: illegal argument when I try to run jar files.
Saturday 16 February 2002 07:09 pm Jon Doe wrote:
How do I execute a jar file? I keep getting -jar: illegal argument when I try to run jar files.
What do you get from 'java -version', 'which java', and 'whereis java'? This worked for me: hattons@baldur:/usr/lib/java/demo/jfc/SwingSet2> java -jar SwingSet2.jar & I do get the following rather anoying messages which I've never bothered to track down: hattons@baldur:/usr/lib/java/demo/jfc/SwingSet2> Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type VirtualBinding Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding But it runs. HTH, Steven
On Sat, 16 Feb 2002 19:47:02 -0500
"Steven T. Hatton"
Saturday 16 February 2002 07:09 pm Jon Doe wrote:
How do I execute a jar file? I keep getting -jar: illegal argument when I try to run jar files.
What do you get from 'java -version', 'which java', and 'whereis java'?
This worked for me: hattons@baldur:/usr/lib/java/demo/jfc/SwingSet2> java -jar SwingSet2.jar &
which java: /usr/lib/java/bin/java java -version: java version "1.1.8 whereis java: java: /usr/lib/java /usr/share/man/man1/java.1.gz I tried the above that you mention and still get the same error.
Saturday 16 February 2002 07:59 pm Jon Doe wrote:
On Sat, 16 Feb 2002 19:47:02 -0500 which java: /usr/lib/java/bin/java
java -version: java version "1.1.8
whereis java: java: /usr/lib/java /usr/share/man/man1/java.1.gz
I tried the above that you mention and still get the same error.
It looks as if you have 1.1.8 as the first thing in your path, or as the only Java installed. There is a rather ugly complication resulting from the fact StarOffice requires 1.1.8. When you install the StartOffice RPM, you end up with 1.1.8 'taking over'. I really wish SuSE would do something to cause StarOffice to set the necessary parameters in its startup script, and not mess up the rest of the Java on the system. 1.1.8 is ancient, and should not be treated as the primary Java on the box. I finally did exactly that, and removed the automatic setup of java from the /etc/rc.config. I just installed Java 1.4 using sun's RPM. I am setting my $CLASSPATH, $PATH, and $JAVA_HOME by hand in the /etc/profile.local. This is one of the things I don't like about Java. Each upgrade breaks code written for, and/or compiled with older versions. What I did is cd /usr/lib/. ls -l to make sure java was a symlink. rm java. ln -s ../java/j2sdk1.4.0. and put PATH=/usr/lib/java/bin:$PATH and export JAVA_HOME=/usr/lib/java in the /etc/profile.local. You don't officially need the JAVA_HOME, but some people still depend on it in their code. If this doesn't make a lot of sense, I can try to explain it better if you're still stuck. Steven
You have to use the java provided in the java2 RPM. It can be installed alongside the java RPM, and then you can just change the symlink that is /usr/lib/java. -tara On Sat, Feb 16, 2002 at 07:09:25PM -0500, Jon Doe wrote:
How do I execute a jar file? I keep getting -jar: illegal argument when I try to run jar files.
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
participants (3)
-
Jon Doe
-
Steven T. Hatton
-
Tara L Andrews