Friday, May 21, 2010

How to identify the JDK version on Unix. am looking for the command. Javac -version does not work.?

How to identify the JDK version on Unix

How to identify the JDK version on Unix. am looking for the command. Javac -version does not work.?
BTW... Should be java -version, not javac -version.





You first need to find where java is installed. If java -version doesn't work, that means that it is not in your path. Change directories to the root directory and do a search for java to locate where it is installed. You might find that it is installed in several different locations. /usr/local/share/bin/java or /usr/bin/java, etc. Once you find it you can either add it to your path or change directories to where it is located. If added to path, then just run the java -version. If in the directory, then type ./java -version
Reply:you can try to type the full path.





or search for the java folder. you will find that the name of the folder includes the java version (if there are many version it is suppose to be the lastest).
Reply:i hope u can access other commands of java like compiling java code,


if not then u first login with ur account, so that u can access java classpath.





Other thing ,i hope u tried like this "$ java -version"


No comments:

Post a Comment