java - ClassNotFoundException while running jar -
i getting classnotfoundexception
when try run jar whith below command:
java -jar myjar.jar
i created jar eclipe. myjar depends of couple of other jars. saw in ecplise these other jars there in classpath.
i added these jars classpath in unix using export classpath. still classnotfoundexception.
exception stack trace:
exception in thread "main" java.lang.noclassdeffounderror: org.apache.hadoop.conf.configuration @ com.a.hdfscopy.readuri(hdfscopy.java:16) @ com.a.copymain.main(copymain.java:9) caused by: java.lang.classnotfoundexception: org.apache.hadoop.conf.configuration @ java.net.urlclassloader.findclass(urlclassloader.java:434) @ java.lang.classloader.loadclass(classloader.java:660) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:358) @ java.lang.classloader.loadclass(classloader.java:626) ... 2 more
class path before:
/opt/ibm/biginsights/ihc/lib/biginsights-gpfs-1.1.1.jar:/opt/ibm/biginsights/ihc/hadoop-core.jar:
class path after (included locations of jars needed dependencies) :
[biadmin@big-instght-15 ~]$ echo $classpath /opt/ibm/biginsights/ihc/lib/biginsights-gpfs-1.1.1.jar:/opt/ibm/biginsights/ihc/hadoop-core.jar::/home/biadmin/hadoop_jars/commons-logging-1.1.1.jar:/home/biadmin/hadoop_jars/commons-configuration-1.8.jar:/home/biadmin/hadoop_jars/commons-lang-2.4.jar
but, realized if open new terminal , echo $classpath, displays class path before. doesn't reflect changes made classpath. i.e. doesn't show class path after.
how fix this?
thanks,
mahalakshmi
what main class listed in manifest.mf
? if unjar jar, in jarfile in correct location?
Comments
Post a Comment