• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question

 
Tmmet Johnson
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This could be a stupid question.
Can anyone help me out?
I have jre installed in Unix machine.
My question is
Do I have to set $PATH in my .sh file to run the java program?
I am getting java.lang.NoClassDefFOundError.JRE not found.I know it is not able to identify the JRE.
Can anyone throw some light on this issue?

Thanks in advance,
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you elaborate more on what the name of the class is and what you typed at the command line?
 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens when you type
java -version
at the command prompt?
 
Tmmet Johnson
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When I type java -version, I get jdk1.5.
Why I get JRE not found error.I though we need $PATH to be set explicitly only if I compile my java program in that machine.If I just run my Java Program , I don't need the $PATH to be set as $CLASSPATH will take care of it know.Please correct me if I am wrong.
Thanks in advance,
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The fact that you can type "java -version" and see "1.5" means that PATH is already set properly.

There is no program named "JRE" or "jre". The "JRE", the "Java Runtime Environment" includes the "java" application launcher, the Java runtime libraries, and other components needed to run Java software. The "JDK" or "J2SDK", the "Java Development Kit", includes everything that's in the JRE, plus the Java compiler javac and other development tools.
 
Tmmet Johnson
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
thanks for the answers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic