Solved

Java: question about bash variables and/or enviromental variables

Posted on 2013-01-07
2
355 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
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now