• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

Environment Variable

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 77957
373
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 9050
21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
off to the intermediate forum...
 
Nitin Pathak
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic