• Post Reply Bookmark Topic Watch Topic
  • New Topic

confuse on how to set the java_home classpath correctly

 
SyncSlave
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Java peoples,

I am new person for linux.
I install j2ee1.4 in RedHat Fedora and set the path in profile file of /.bash_profile directory of linux.

PATH=./:/root/j2ee/jdk/bin:$PATH:$HOME/bin
PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"

export JAVA_HOME=/root/j2ee/jdk/bin
export PATH=$PATH:$JAVA_HOME/bin
CLASSPATH=/root/j2ee/jdk/lib:/root/j2ee/jdk/lib/tools.jar:/root/j2ee/jdk/lib/dt.jar:/root/j2ee/jdk/lib/htmlconverter.jar

export USERNAME BASH_ENV PATH CLASSPATH

When I compile one java file(Testing.java)
java Testing
it will gives the error:
Exception in thread "main" java.lang.NoClassDefFoundError: Testing

Please give the suggestion to configure the java in linux

Thanks in advance,
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!