Cross Column

Showing posts with label JDK Version. Show all posts
Showing posts with label JDK Version. Show all posts

Monday, August 20, 2012

JRockit Version Information

There are at least three version  numbers of interest for each JRockit release:
  1. JRockit JVM version
  2. JDK version
  3. Mission Control version

JDK Version and JVM Version

To obtain the version number of the JDK and JVM, you execute the following command from the prompt:
  • java -version
For example, this is displayed from my system:

java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07) 
Oracle JRockit(R) (build R28.1.3-11-141760-1.6.0_24-20110301-1432-linux-x86_64, compiled mode)

Each version of the JRockit JVM is built for several different JDKs. Oracle JRockit R28 supports the following Java versions:
  • J2SE 5.0
  • Java SE 6
Ensure that your application complies with the Java specification corresponding to the Oracle JRockit release that you use.

You can find two pieces of information from the above output:
  1. JDK version
    • "1.6.0_24" is the JDK version being bundled with the JVM
    • In other words, Java 1.6 is supported and it is bundled with the JDK classes from update 24-b07.
  2. JRockit JVM version
    • R28.1.3-11-141760-1.6.0_24-20110301-1432-linux-x86_64
      • Version number:  R28.1.3
      • Build number:  11
      • Change number:  141760
      • Date and Time: 20110301-1432 (in  compact ISO 8601 format)
      • JVM is built for:
        • OS: Linux
        • CPU Architecture: x86_64

Mission Control Version

The JRockit Mission Control tools suite includes tools to monitor, manage, profile, and eliminate memory leaks in your Java application without introducing the performance overhead normally associated with tools of this type.

The version number for JRockit Mission Control can be gathered from command prompt by executing:
  • jrmc -version

The output should look like this:

Oracle JRockit(R) Mission Control(TM) 4.0 (for JRockit R28.0.0)
  java.vm.version = R28.1.3-11-141760-1.6.0_24-20110301-1432-linux-x86_64
  build = M4.0.1-19
  chno = 134472
  jrmc.fullversion = 4.0.1
  jrmc.version = 4.0
  jrockit.version = R28.0.0
  year = 2010

The frst line tells us what version of Mission Control this is and what version of JRockit it was created for. The java.vm.version line tells us what JVM Mission Control is actually running on.

References

  1. Oracle JRockit--The Defnitive Guide
  2. J2SE 5.0
  3. Java SE 6
  4. Oracle® JRockit Installation and Upgrade Guide Release R28
  5. JRockit Mission Control
  6. Oracle® JRockit Command-Line Reference Release R28

Tuesday, April 3, 2012

Configuring JDeveloper with a Different JDK

In JDeveloper, you can change the JDK version (for example, changing from 32-bit to 64-bit) that the IDE uses or the project uses easily.  But, don't be confused with which is which.  In this article, we will introduce you how to do both.

Java SE Definitons

JDeveloper uses Java SE definitions to describe an installed Java SE environment. This environment can be either a JRE or an SDK.

Note that if you are using a JRE, some features may not be available. Every JDeveloper project uses a Java SE definition to determine what version of the Java API to compile and run with.

Changing JDK That IDE Uses

To change JDK that IDE uses, you can do this:
  • Configuring JDeveloper via the SetJavaHome configuration parameter in the jdev.conf.
Noted that directive SetJavaHome is not required by default, except for the base install, since the launcher will determine the JAVA_HOME.  On Windows it looks in ..\..\jdk, on UNIX it first looks in ../../jdk. If no JDK is found there, it looks in the PATH.

JDeveloper creates a Java SE definition for the Java SE environment being used to run JDeveloper. By default, this definition is used by all new projects. However, additional definitions can be created from any available Java SE. These new definitions can be created in either the user libraries or the system libraries. In a multiuser environment, Java SE definitions created in the user libraries are user specific, while ones created in the system libraries are shared by all users.

To create a new Java SE definition, you follow these steps:

Tools > Manage Libraries > Java SE Definition > New
This will bring up a Create Java SE dialog:
Each Java SE definition encapsulates:
  • a Java executable—used for launching programs
  • a classpath—containing the classes available within the Java SE environment
  • a source path—containing the source files associated with the Java SE classes
  • a doc path—containing the Javadoc files for the Java SE classes
From now on, JDeveloper will use the new JDK for its operation.   For existing projects, we need to make sure it uses the new JDK.

Changing JDK That Project Uses

Setting the target Java SE specifies which Java SE JDeveloper will use when compiling and running your project.

To view or change the current Java SE for an individual project:
  1. In the Application Navigator, select the appropriate project.
  2. From the main menu, choose Application > Project Properties, or right-click and choose Project Properties.  The Project Properties dialog opens with the common input paths displayed or on the last page that you viewed.
  3. On the Libraries and Classpath page the Java SE Version used for the project is displayed. Click Change to define a new Java SE.
  4. When finished, click OK.



Also Consider...

When you run the Integrated WebLogic[3] for the first time in the JDeveloper, the
  • .jdeveloper/system11.1.1.x.xx.xx.xx/DefaultDomain/bin/startWebLogic.sh
script will be created.  Associated with that, the setDomainEnv.sh script will be created in the same directory.  So, if you do want to change the JDK location, you may want to change this file as well.

Finally, JDeveloper enables you to manage libraries and Java SEs outside the project scope too.  To learn more, read [4].

References

  1.  JDeveloperWorking with Applications and Projects
  2. Oracle JDeveloper 11gR2 Cookbook by Nick Haralabidis
  3. Integrated WebLogic Server (WLS)
  4. Managing Libraries and Java SEs Outside the Project Scope 
  5. What operating systems and JDK's are supported for the JDeveloper IDE?