finding the java path in AIX | Unix Linux Forums | IP Networking

  Go Back    


IP Networking Learn TCP/IP, Internet Protocol, Routing, Routers, Network protocols in this UNIX and Linux forum.

finding the java path in AIX

IP Networking


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-28-2005
fermisoft's Avatar
fermisoft fermisoft is offline
Registered User
 
Join Date: Jun 2005
Last Activity: 25 June 2007, 7:09 AM EDT
Location: Mumbai
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
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,
How to find the Java Path programmatically ??
Dows java installer create any environmental varibles for the path ??

Thanks & Regards
Karthik
Sponsored Links
    #2  
Old 07-10-2005
zylwyz's Avatar
zylwyz zylwyz is offline
Registered User
 
Join Date: Jun 2005
Last Activity: 15 May 2006, 12:33 PM EDT
Location: I'm living in Unix :)
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,
this is something for you, use this simple script:

Code:
#!/bin/sh
# "which" is answer for your question
`which java` $1

Sponsored Links
    #3  
Old 07-14-2005
fermisoft's Avatar
fermisoft fermisoft is offline
Registered User
 
Join Date: Jun 2005
Last Activity: 25 June 2007, 7:09 AM EDT
Location: Mumbai
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Finding the path of the C program sreeharshasn Programming 6 11-03-2010 04:24 PM
finding a file in its path gavineq UNIX for Dummies Questions & Answers 2 09-18-2008 02:43 PM
Set java Path adtd8 UNIX for Dummies Questions & Answers 1 06-21-2008 09:57 PM
Finding relative path of a file chiru_h Shell Programming and Scripting 4 04-16-2007 08:20 PM
Finding current working dir path liteyear18 UNIX for Dummies Questions & Answers 6 09-10-2001 07:43 PM



All times are GMT -4. The time now is 12:21 AM.