How To Find What Java Version You Are Using?
Kushal Paudyal December 20th, 2009.This post has 238 views
One of the visitors of my blog asked me a question, “hey Kushal what java version are you using to compile your files” ? Well, I had lots of java versions installed in my computer for many different reasons. Honestly I wasn’t sure which version was I exactly using. So I wrote this little utiltiy that tells you the java version that you are currently using and the vendor of that java. Remember Sun Microsystems is not the sole java vendor. There are many others.
package com.kushal.utils;
/**
* @author Kushal Paudyal
* www.sanjaal.com/java
* Last Modified On 05-20-2009
*/
/**
* Demonstrates a simple way of getting
* --Java Version
* --Java Vendor
*/
public class GetJavaVersionAndVendor {
public static void main(String args [])
{
String version=System.getProperty("java.version");
String vendor=System.getProperty("java.vendor");
System.out.println("Java Version Is: "+version);
System.out.println("Java Vendor Is: "+vendor);
}
}
———————-
Here is the sample output of this program
Java Version Is: 1.6.0_11 Java Vendor Is: Sun Microsystems Inc.
Sanjaal.com is owned and maintained by Sanjaal Corps, Nepal. The company offers Webhosting and Domain Registration Services, IT Solutions and Business Analysis. Sanjaal.com website features H1B Visa Information, Entertainment Portal, Link Directory Service, Free Articles, Free Open Source Tutorials on Java and J2EE Platform, Digital Photography, High Resolution Picture Gallery and Free Reliable Image Hosting Services. Future plan includes Open Source Software Development Portal, Technical Solutions and Customizable Movie and Music Arena. We would be introducing data backup, data recovery, data hosting and voip solutions. Stay free from phishing – our website does not ask for your credit card and banking information. Happy Surfing!
Originally posted 2009-05-20 09:33:06.
- Java Utilities
- Comments(0)
