|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| IP Networking Learn TCP/IP, Internet Protocol, Routing, Routers, Network protocols in this UNIX and Linux forum. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
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
|
||||
|
||||
|
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
|
||||
|
||||
|
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 | ||
|
![]() |
| Thread Tools | Search this Thread |
| 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 |
|
|