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