Installing from a jar filr
Aart Koelewijn
aart at mtack.xs4all.nl
Fri Sep 18 10:47:51 UTC 2009
On Thu, 17 Sep 2009 17:04:29 -0400, Avraham Hanadari wrote:
> Aart Koelewijn wrote:
>> On Thu, 17 Sep 2009 13:52:08 -0400, Avraham Hanadari wrote:
>>
> snip
>
>>> The Arachnophilia instructions say:
>>>
>>> Put the JAR file you downloaded (Arachnophilia.jar) anywhere
>>> appropriate on your system, be sure you have also installed the Java
>>> runtime before running Arachnophilia.
>>>
>>> Open a command console (Linux: shell console), move to the
>>> Arachnophilia program directory, type "java -jar Arachnophilia.jar"
>>> For convenience, this command can be made part of a shell script, and
>>> those using X windows can easily make a desktop icon.
>>>
>>>
> jar file moved to /usr/bin and cd to location
>
> java -jar ./Arachnophilia.jar keyed with this result:
>
> rick at brainstorm3l:~$ cd /usr/bin
> rick at brainstorm3l:/usr/bin$ java -jar ./Arachnophilia.jar Exception in
> thread "main" java.lang.UnsatisfiedLinkError: Can't load library:
> /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1666) at
> java.lang.Runtime.load0(Runtime.java:787) at
> java.lang.System.load(System.java:1022) at
> java.lang.ClassLoader$NativeLibrary.load(Native Method) at
> java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1767) at
> java.lang.ClassLoader.loadLibrary(ClassLoader.java:1684) at
> java.lang.Runtime.loadLibrary0(Runtime.java:840) at
> java.lang.System.loadLibrary(System.java:1047) at
> sun.security.action.LoadLibraryAction.run
(LoadLibraryAction.java:67) at
> sun.security.action.LoadLibraryAction.run
(LoadLibraryAction.java:47) at
> java.security.AccessController.doPrivileged(Native Method) at
> java.awt.Toolkit.loadLibraries(Toolkit.java:1614) at
> java.awt.Toolkit.<clinit>(Toolkit.java:1636) at
> java.awt.Component.<clinit>(Component.java:568)
> Could not find the main class: Arachnophilia.Arachnophilia. Program will
> exit.
> rick at brainstorm3l:/usr/bin$
> rick at brainstorm3l:/usr/bin$
>
> I guess I did something wrong.
>
> Avraham
Yoou could try the command (in /usr/bin/)
$ java -classpath "$classpath:/usr/bin/" -jar ./Arachnophilia.jar
or (I'm not sure which will work, but I expect one of them will)
$ java -classpath $classpath:/usr/bin/Arachnophilia.jar" -jar ./
Arachnophilia.jar
(on one line of course)
With the one that works it may not be necessary to cd to /usr/bin/ first.
(You do have java-6-openjdk installed, do you? If not, it will not work.)
I would not have used /usr/bin/ anyway because that is where your
distribution puts its executables and may remove them. /usr/local/ is the
usual place for things the administrator of the machine installs and
should not be touched by the distribution.
Aart
More information about the ubuntu-users
mailing list