• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Environment Variable

 
Ranch Hand
Posts: 154
  • 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: 74606
335
  • 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: 9031
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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic