LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-09-2007, 04:01 AM   #16
me4linux
Member
 
Registered: Aug 2006
Distribution: Fedora 7
Posts: 165

Original Poster
Rep: Reputation: 30

Hi jay

i have created Hello.java in the /home/user/Desktop
i have reinstalled fedora core 6 and i have set all the prerequisites for the jdk and tomcat..i have installed netbeans
for the first time when i have run javac,java they worked ....but now not working

i am getting the following error

[root@localhost Desktop]# vi Hello.java
[root@localhost Desktop]# javac Hello.java
[root@localhost Desktop]# java Hello
Exception in thread "main" java.lang.NoClassDefFoundError: Hello

the content in the Hello.java file is as follows

[root@localhost Desktop]$ cat Hello.java
public class Hello{

public static void main (String [] args){

System.out.println("Hello");

}
}

edited lines in /etc/profile are as follows
export JAVA_HOME=/opt/jdk1.6.0
export CATALINA_HOME=/opt/netbeans-5.5/enterprise3/apache-tomcat-5.5.17
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=/opt/netbeans-5.5/enterprise3/apache-tomcat-5.5.17/common/lib/servlet-api.jar

content of $HOME/.bashprofile

GNU nano 1.3.12 File: /root/.bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/opt/jdk1.6.0/bin

export PATH
unset USERNAME

PLEASE HELP ME TO START WORKING WITH JAVA IN LINUX


ABOUT THE SERVLET

i have added CLASSPATH variable with the value /path_to_tomcat/common/bin/servlet.api.jar in the /etc/profile
then i have compiled and class file is created in the pwd
How to run this servlet form the browser
i have saved the TestingServlet.java in /path_to_tomcat/webapps/my_apps/WEB-INF/
and a class file is created in this directory
How to call this servlet form the browser

I think you will be frustating to answer the strange problems of newbies like me....what do u feel....???
I am very thankful to you for having taken time to answer my questions ..
No query of mine in this forum had these many replies that too from a single user.....

I have started a new thread named "Using java and netbeans in fedora core 6"
http://www.linuxquestions.org/questi...85#post2662785
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mplayer for fedora core-4 g_gaurav Linux - Software 3 09-15-2006 03:22 PM
Extremely Flakey GUI in Fedora Core 5 Wheat_Thins Linux - Software 8 05-05-2006 06:15 AM
Fedora Core GUI problems hazle Linux - Newbie 3 07-22-2005 12:35 AM
Problems with mplayer GUI in Fedora C2 x86_64 dwmorton Linux - Newbie 5 06-19-2004 01:09 PM
GUI Display Distortion in Fedora Core Tabitha Fedora 0 04-09-2004 10:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration