finding the java path in AIX


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 06-28-2005
finding the java path in AIX

How to retrieve the path of Java bin directory in AIX (or any unix OS)??

Actually my problem is,
I have a jar file called App.jar. I want to execute it by calling the javaw executable.
My command is "/usr/java130/javaw -jar App.jar".

I've written this command into a shell script. Now, when I run this shell script in another machine, the command fails because of the different java path.

My question, Smilie
How to find the Java Path programmatically ??
Dows java installer create any environmental varibles for the path ??

Thanks & Regards
Karthik
# 2  
Old 07-10-2005
Hi,
this is something for you, use this simple script:
Code:
#!/bin/sh
# "which" is answer for your question
`which java` $1

# 3  
Old 07-14-2005
Thanks dude.

I added the java path manually to PATH variable in my .profile file. After that the command javaw -jar DVDtool.jar works well. Dont even have to mention which.
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Java compilation problem - path not set Nancy Wilson Programming 4 10-20-2018 04:33 AM
Finding the path to an executable , installed package javanoob Solaris 3 02-18-2016 10:17 PM
Set java classes path Hscript Programming 3 11-02-2014 09:42 AM
Finding a script/program on $PATH wbport Shell Programming and Scripting 7 05-20-2014 05:41 PM
Finding TL of AIX manoj.solaris AIX 1 05-08-2012 04:53 AM
Finding the path of the C program sreeharshasn Programming 6 11-03-2010 04:24 PM
Java sting up path problem repinementer Programming 1 01-19-2010 05:19 AM
Finding Java Home? Sepia UNIX for Dummies Questions & Answers 4 12-02-2008 01:26 PM
finding a file in its path gavineq UNIX for Dummies Questions & Answers 2 09-18-2008 02:43 PM
Finding path of a running script puneet Shell Programming and Scripting 3 08-19-2008 08:34 AM
Set java Path adtd8 UNIX for Dummies Questions & Answers 1 06-21-2008 09:57 PM
How to set path for java in UNIX subhotech UNIX for Dummies Questions & Answers 2 07-12-2007 10:57 AM
Finding relative path of a file chiru_h Shell Programming and Scripting 4 04-16-2007 08:20 PM
AIX and java jbeaudry AIX 1 06-09-2006 12:34 AM
Finding current working dir path liteyear18 UNIX for Dummies Questions & Answers 6 09-10-2001 07:43 PM