File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Environment Variable

 
jignesh soni
Ranch Hand
Posts: 150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on a server.
How do I check that jre is set in PATH or CLASSPATH variable ?
Can jre be set in JAVA_HOME variable or any other variable ?

thanks
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JAVA_HOME may be used as part of PATH.
The JRE might be in something like /usr/bin, as a .so file, otherwise it ought to be in PATH.
You might not have anything in CLASSPATH. Try echo (on Bash)
[Campbell@queeg ~]$ echo $PATH
/usr/java/jdk1.6.0_11/bin/:/usr/java/jdk1.6.0_11/bin/:/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/Campbell/bin
[Campbell@queeg ~]$ echo $CLASSPATH

[Campbell@queeg ~]$ echo $JAVA_HOME

[Campbell@queeg ~]$
Note I have nothing set as JAVA_HOME or CLASSPATH. I think on Windows you write PATH at a command line.

Is that any help to you?
[ December 15, 2008: Message edited by: Campbell Ritchie ]
 
Nitin Pathak
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In windows as well, try typing the classpath in the command prompt:

In the Tomcat servlet container, the console explicitly logs in the environment variables included in the java library path logged at INFO level during the startup.
 
ramya narayanan
Ranch Hand
Posts: 338
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it mean that when we're starting the tomcat service the environment variables path and classpath will be displayed at the [INFO] tags.
Regards.
 
Bert Bates
author
Sheriff
Posts: 8898
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
off to the intermediate forum...
 
Nitin Pathak
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ramya narayanan:
Does it mean that when we're starting the tomcat service the environment variables path and classpath will be displayed at the [INFO] tags.
Regards.


Its necessarily the INFO message for Tomcat Native library (tcnative-1.dll) which is optional. The list of libraries added to your PATH are displayed right ahead.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic