jar files
hello ,
how can i run jar files... java -jar (command not found)... |
Re: jar files
Quote:
Code:
java -jar jarfile try the following: Code:
which java |
which java =
which: no java in (/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:/usr/lib/java/bin:/usr/lib/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:/usr/share/texmf/bin) but java is working ... in firefox |
Edit your /home/username/.bash_profile and add the path to java in it
exemple : JAVA_HOME=/opt/jdk1.5 export JAVA_HOME PATH=$JAVA_HOME/bin:/usr/bin:/blablbablabla export PATH |
It is because firefox has plugin linked directly into plugins directory.
You should give full pathname then. /usr/lib/java/bin/java -jar <filename> |
Quote:
Firefox plugin = Java Runtime environment?? |
it says that
/usr/bin/cgoban: line 25: 3388 Segmentation fault /home/mesut/firefox/firefox-installer/plugins/libjavaplugin_oji.so -jar $CGOBAN_DIR/cgoban.jar $* |
help me
|
You cannot use the firefox plugin to run a Java program directly, you must use the java command.
Where is your java command located? |
It should be: /usr/java/jre1.5.0_02/bin/java -jar $CGOBAN_DIR/cgoban.jar $*
The jre1.5.0_02 directory may vary depending on the version of Java you've installed. |
i did that
Failed to load Main-Class manifest attribute from /usr/local/cgoban/cgoban.jar says. ??? |
ok. i've installed again and it worked.
very very thanks to gbonvehi :) |
man java says:
-jar Executes a program encapsulated in a JAR archive. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form Main-Class:classname. Here, classname identifies the class having the public static void main(String[] args) method that serves as your applica- tion's starting point. See the Jar tool reference page and the Jar trail of the Java Tutorial for information about working with Jar files and Jar-file manifests. When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored. Get in contact with the developer and ask him how to run this, or to fix it if it's broken. |
All times are GMT -5. The time now is 11:18 PM. |