Solved

Java: question about bash variables and/or enviromental variables

Posted on 2013-01-07
2
360 Views
Last Modified: 2013-01-07
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
Comment
Question by:epifanio67
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Accepted Solution

by:
mustaccio earned 500 total points
ID: 38751799
Neither, I think. More like

#!/bin/sh
JAVACMD=${JAVA_HOME}/bin/java
0
 

Author Closing Comment

by:epifanio67
ID: 38751869
thank you expert...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Eclipse Help Java EE 5,6,7 Documentation, why not Java EE 8 8 46
Java basic valueOf question 1 34
import as existing maven project 3 41
Coding for the first time 9 70
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question