0

I have been trying too long to run a Java program in a server unsuccesfully. I run

java -cp bin:../../lib/*:../../bin/:lib/*: Test

and I get

java.lang.NoClassDefFoundError: edu/uci/ics/jung/graph/UndirectedSparseGraph

The class is in a .jar located in lib/ and is requested by another class located in ../../lib

The weird thing is that some of the classes from other jars in lib/ are found. Only this particular one seems to be problematic. When I run it with Eclipse in my local it runs just fine.

Any idea what may be happening?

Thanks in advance

Solution:

No idea what happened. I just recompiled my jars.

Brandon
  • 16,382
  • 12
  • 55
  • 88
Altober
  • 956
  • 2
  • 14
  • 28
  • possible duplicate of [Setting multiple jars in java classpath](http://stackoverflow.com/questions/219585/setting-multiple-jars-in-java-classpath) – SANN3 Feb 21 '14 at 10:45
  • Hi, thanks but i am not sure it is the same, according to the question you cite my expression is well formed. Maybe something to do with interdependencies? – Altober Feb 21 '14 at 10:52
  • Have you tried putting all the jars in lib/ rather than scattered around? – anonymous Feb 21 '14 at 10:57
  • yes, thanks I tried that but still no. It is a class in a jar which needs a class in another jar. Can this have something to do wuth the error? – Altober Feb 21 '14 at 11:00
  • Post the complete stack trace of the exception. – JB Nizet Feb 21 '14 at 11:05
  • The class "edu/uci/ics/jung/graph/UndirectedSparseGraph" is present in jung-graph-impl-2.0.jar. Please verify whether you have this jar in your lib folder? – AJJ Feb 21 '14 at 12:10
  • Hi, thanks a lot @Jayaprasad but it is there. I just solved it by recompiling the jar – Altober Feb 21 '14 at 13:12

0 Answers0