Sponsored Content
Full Discussion: finding the java path in AIX
Special Forums IP Networking finding the java path in AIX Post 76406 by fermisoft on Tuesday 28th of June 2005 07:49:47 AM
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
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding relative path of a file

I have to relatively get the path of a file to use it in the script. The directory structure is /export/opt/XTools/ and under this there are several version directories - 1.0_A0, 1.0_A1, 1.0_A2 etc.,. The actual file is under these directories: installscript.sh My script should pickup the... (4 Replies)
Discussion started by: chiru_h
4 Replies

2. UNIX for Dummies Questions & Answers

How to set path for java in UNIX

How to set path for java in UNIX? (2 Replies)
Discussion started by: subhotech
2 Replies

3. UNIX for Dummies Questions & Answers

Set java Path

Hey eveyone, I am new to unix, and I just installed java 6, however it doesn't recognize javac command I tried to set the path such as: set path="/usr/java/jdk1.6.0_06/bin/ but i still got the same error message. any ideas? -andi (1 Reply)
Discussion started by: adtd8
1 Replies

4. Shell Programming and Scripting

Finding path of a running script

Hi, I just want to know any code by which i can get the path of the script which i am running. This is required to store the output in the same directory from where the script is running. pwd fails if I give absolute path of script from some other directory. Thanks in advance Puneet (3 Replies)
Discussion started by: puneet
3 Replies

5. UNIX for Dummies Questions & Answers

finding a file in its path

I have a file that has multiple entries within the Unix system. Korn shell scripts are calling this file (also a ksh) with a . in front of it, and I'm trying to determine which file it is using based on the $PATH by finding where it is located first. Any suggestion on how to go about this?... (2 Replies)
Discussion started by: gavineq
2 Replies

6. UNIX for Dummies Questions & Answers

Finding Java Home?

Solaris 10 In the installation documentation for an application I am installing it says to run something from <JAVAHOME> Where is Java Home/JAVAHOME, how can I find it? I have tried echo $JAVAHOME but there is not output. Any ideas? Thanks edit: there is a directory called... (4 Replies)
Discussion started by: Sepia
4 Replies

7. Programming

Java sting up path problem

Hi java programmers I'm a newbee to the Java. Could please help me to set the path correctly. I'm getting the following error. ----jGRASP exec: javac -g C:\Documents and Settings\bogugk\Desktop\HelloWorldApp.java ----jGRASP wedge2 error: command "javac" not found. ---- This command... (1 Reply)
Discussion started by: repinementer
1 Replies

8. Programming

Finding the path of the C program

Hi All, I have a c program called findPath.c in a path /home/harsh/c-Programs/. How can i find the path where the program is stored at runtime?? I have given the following #include<stdio.h> int main() { system("dirname $0"); return 0; } This is resulting in the output as . <single dot... (6 Replies)
Discussion started by: sreeharshasn
6 Replies

9. Shell Programming and Scripting

Finding a script/program on $PATH

I am trying to put together a script to find a requested script or program on the user's search path. Am trying to replace the colons separating the parts of a path with a newline to let xargs pass the directories to a list command, but I haven't gotten that far. This is my progress: echo... (7 Replies)
Discussion started by: wbport
7 Replies

10. Programming

Set java classes path

I add some new java jar files in the old project, how can I edit the class path? How can I compile all the java classes by just type 'C':o (3 Replies)
Discussion started by: Hscript
3 Replies
java-functions(7)						RPM Java packaging						 java-functions(7)

NAME
java-functions - Functions library for Java applications. Written for the JPackage Project <http://www.jpackage.org/>: SYNOPSIS
set_jvm() Set the java virtual machine. Use a JAVA_HOME if defined, or try to find it from java command set_classpath() Set the classpath - this functions requires a valid JAVA_HOME, JAVACMD, and JAVA_LIBDIR. JARs could be specified as an argument, or via ADDITIONAL_JARS variable. set_javacmd() set the JAVACMD variable. Options should be passed via JAVACMD_OPTS variable. set_flags() set FLAGS variable. They could be specified as an argument, or via ADDITIONAL_FLAGS variable. set_options() set OPTIONS variable. They could be specified as an argument, or via ADDITIONAL_OPTIONS variable. run() run the application. It executed a following command. If VERBOSE is defined, then it prints the command to stdout. exec $JAVACMD $FLAGS -classpath $CLASSPATH $OPTIONS $MAIN_CLASS "$@" set_jvm_dirs() set JVM-related directories (JVM_LIBDIR, JAVA_VERSION, JAVAVER_LIBDIR and JAVAVER_JNIDIR variables). Requires a correct JAVA_LIBDIR, JAVA_HOME and JAVA_CMD. link_jar_repository() links a jar repository. Options could be found in build-jar-repository(1) find_jar() finds a specific extention (jar or directory). Requires a correct JAVA_LIBDIR, JAVAVER_LIBDIR and JVM_LIBDIR. Used by find-jar(1) com- mand. do_find_jar() core routine used by find_jar() check_java_env() checks java environment - the JAVA_HOME, JAVACMD, JAVA_LIBDIR, JNI_LIBDIR variables. DESCRIPTION
This is a library of generic shell functions which should be used on jpackage.org compatible distributions. FILES
/use/share/java-utils/java-functions shell script functions library for Java applications /etc/java/java.conf system-wide Java configuration file ~/.java/java.conf user's Java configuration SEE ALSO
Regular Manual Pages build-jar-repository(1) find-jar(1) java.conf(5) jpackage-utils(7) AUTHORS
Guillaume Rousse <guillomovitch@sourceforge.net> Ville Skytta <scop at jpackage.org> David Walluck <david@jpackage.org> Nicolas Mailhot <Nicolas.Mailhot at laPoste.net> REPORTING BUGS
Report bugs using JPackage Bugzilla (http://www.jpackage.org/bugzilla/) jpackage-utils 1.7.5 February 2009 java-functions(7)
All times are GMT -4. The time now is 01:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy