This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes class not found exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "class not found exception" Watch "class not found exception" New topic

class not found exception

harshada patil
Ranch Hand

Joined: Mar 12, 2011
Posts: 96
I compiled code with java version 1.6.0_21, and now I am trying to run code with jave version 1.6.0_31,
I compiled java code on windows machine and trying to run it on linux.
java $JAVA_OPTS -classpath $CLASSPATH app

according to me as javac and java versions are same, what might be the problem?
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

Do an "echo ${CLASSPATH}" and see what the values are of the CLASSPATH variable. Then verify the directories/jar files in CLASSPATH do indeed exist or whether you need to include additional jar/directories.
Peter Johnson

Joined: May 14, 2008
Posts: 5845

It might help us help you if you posted the full exception message, then we don't have to guess which class was not found.

JBoss In Action
I agree. Here's the link:
subject: class not found exception