• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

Java: question about bash variables and/or enviromental variables

Hello Experts,

I am a linux box

I have my environment variables set as:
JAVA_HOME=/usr/lib/java-1.6.0/jdk1.6.0_24
PATH=/usr/lib/java-1.6.0/jdk1.6.0_24

In my bash file I want to point to the java executable, which is the correct way to set it?

#!/bin/sh
JAVACMD=java

OR

#!/bin/sh
JAVACMD=JAVA_HOME

?

thanks Experts...
0
epifanio67
Asked:
epifanio67
1 Solution
 
mustaccioCommented:
Neither, I think. More like

#!/bin/sh
JAVACMD=${JAVA_HOME}/bin/java
0
 
epifanio67Author Commented:
thank you expert...
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now