How to set classpath in linux ubuntu
I want to execute .jar file in linux (ubuntu) server but I found the following error
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:1649) 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:1750) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1667) 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:572) at Server.InfiniteChatServer.<init>(InfiniteChatServer.java:42) I think I have to set the classpath first. If i am right please tell me how to set classpath otherwise you can suggest me what is the problem??? |
Quote:
Please check your java with this command : 'java --version'. libmawt.so is present, when openjdk-6-jre is installed : 32bits : /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so 64bits : /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/xawt/libmawt.so Or 'sun-java6-jre' ... 32bits : /usr/lib/jvm/java-6-sun-1.6.0.xx/jre/lib/i386/headless/libmawt.so 64bits : /usr/lib/jvm/java-6-sun-1.6.0.xx/jre/lib/amd64/xawt/libmawt.so Setting up your java version : 'sudo update-alternatives --config java'. May be the package 'sun-java6-jre' will work ? ? Which jar file is it about ? And which Ubuntu version ? 64bits ? .. |
Yes...It works...
I just set the classpath and run XManager(passive).....and jar file executes.. |
All times are GMT -5. The time now is 01:21 AM. |