?
Solved

Java: question about bash variables and/or enviromental variables

Posted on 2013-01-07
2
Medium Priority
?
362 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

770 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