This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Linux / UNIX and the fly likes Java on Fedora 15 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Java on Fedora 15" Watch "Java on Fedora 15" New topic

Java on Fedora 15

Sudhanshu Mishra
Ranch Hand

Joined: May 28, 2011
Posts: 215

Hi all,
I need to install and run Java 6 on Fedora 15.I did installed it on Fedora 15 as per the guidelines,but I faced a problem.I could easily compile my classes ,but could not run them.The error i got was 'NoClassDefFound'.Why is this happening?
Please guide me through.

Peter Johnson

Joined: May 14, 2008
Posts: 5811

Which Java 6? The one from Oracle? Or OpenJDK?

First, verify that the JDK installed properly. Run "java -version" and make sure that it reports the version you installed.

Second, we need to know the classpath you used to run the app, and the name of the missing class. Also the location of where you believe the class resides would help.

JBoss In Action
Sudhanshu Mishra
Ranch Hand

Joined: May 28, 2011
Posts: 215

I am using the java from oracle,i.e Java SE(6).I may have some trouble regarding the classpath though.So please guide me through the correct and precise steps.
Sudhanshu Mishra
Ranch Hand

Joined: May 28, 2011
Posts: 215

Hi all,
I just figured out what was going wrong.It was the classpath,which should be
export JAVA_HOME=export JAVA_HOME="/usr/java/jdk1.7.0_02"

after installing JDK 7 and adding this line in /etc/profile i got my classes compiled and executed.
I agree. Here's the link:
subject: Java on Fedora 15
Similar Threads
Invalid Memeory Class
installing java on fedora
java on feodra
Swing application font issue
Fedora or SUSE for apache/tomcat?