IBM Support

Unable to change Project Facet: Java to 1.7 (IBM Java 7.0 or 7.1) for a Java EE project targeting WAS 8.5.x

Question & Answer


Question

IBM Rational Application Developer (RAD) 9.1.0 with a Java EE Dynamic web project targeting IBM WebSphere Application Server (WAS) 8.5 Unable to change Project Facet: Java to 1.7. It only allows up to Java 1.6.

Cause

WAS 8.5 was not installed with the optional JDK 1.7 (Java 7.0) runtime provided with the WAS 8.5.x install images. Even if it was installed with Java 7.0 , the WAS server profile would have to be changed to use Java 7.0 or a new one created to use it.. Optionally as of of WAS 8.5.5.2+ there is an additional IBM Java 7.1. More on this at the end.

Answer

The traditional WAS v8.5 had been installed with the default Java 1.6 and the server profile was created with that JDK.


Java 1.7 (Java 7.0) for WAS 8.5 is an optional download/install for WAS 8.5 and is available for RAD 9.1 as an optional download on IBM PassPort Advantage (PPA). The JEE {web|ejb} projects are built with the Java version of the WAS server targeted runtime project property. The project can also be set to allow a build to comply with a lower version using the WAS JDK.

Once WAS 8.5 has been installed with Java 1.6 you can still download and install the Java 1.7/7.0 SDK for WAS 8.5. It is an optional download for RAD v8.5+ on IBM PassPort Advantage (PPA). The RAD 8.5+ Passport Advantage (PPA) eAssembly download information list of parts on IBM PassPort Advantage is documented in:

- Rational Application Developer for WebSphere Software eAssembly Parts List
[Tabs] for 9.1.1, 9.1.0, 9.0, 8.5.1, 8.5


The above technote is referenced by
- Rational Application Developer 9.0 Knowledge Center (KC)
-- Creating an installable image from installation files downloaded from Passport Advantage, and similarly for RAD v8.5 and other RAD v9.x. All RAD version KCs can be reached from:
http://www.ibm.com/support/knowledgecenter/SSRTLW/rad_family_page.htm

The extracted zip would result in the folder: "..\WAS85JDK7"


Here is a RAD 9.0 example on PPA with Java 7.0 for WAS 8.5.x:

IBM WebSphere Application Server, SDK for Java Technology Edition V7.0 Multiplatform, Multilingual (download all parts) - optional
Part number Description File name
- CIME1ML IBM Rational Application Developer for WebSphere Software V9.0 Multiplatform Multilingual - IBM WebSphere SDK Java Technology Edition V7.0 for WebSphere Application Server v8.5.5 - Part 1 (Optional)
-- RAD_WS_9.0_Java 7 Ext_WAS 8.5.5_1.zip

- CIME2ML IBM Rational Application Developer for WebSphere Software V9.0 Multiplatform Multilingual - IBM WebSphere SDK Java Technology Edition V7.0 for WebSphere Application Server v8.5.5 - Part 2 (Optional)
-- RAD_WS_9.0_Java 7 Ext_WAS 8.5.5_2.zip

and it is similar for RAD 8.5.x and 9.1.x on PPA. Java 7.1 is not available with the product media. See References on WAS 8.5 Java 7.x (below).


If WAS v8.5 installed with only JDK 6.0 and you need JDK 7.0, make sure \WAS85JDK7 is available in the RAD install images parent folder if using the RAD install launcher in RAD_SETUP:

{RADv{nn} Install Images folder}
\RAD_SETUP\
\RAD\disk\disk{1..n}\
---- the rest are optional
\WAS70\disk{1..n}\
\WAS70-64
\WAS80
\WAS85
\WAS85JDK7 <<< optional, used by WAS85 install additional JDK7 in addition to default JDK6
\WAS855LIBERTY
\WAS855LIBERTYJDK
\{and so forth for other optional parts}

or add it as a separate repository in IBM Installation Manager. Then use:
IBM Installation Manager > Install
to install the JDK 7.0, if WAS v8.5 is already installed with JDK 6.0.


After downloading the correct WAS 8.5 JDK 1.7 from PPA (for RAD 8.5.x/9.x), if you need help installing Java 7.0 for WAS 8.5 and/or switching your WAS 8.5 install to use JDK 1.7, contact IBM Support and they will arrange for IBM WAS support to assist you.

------------------------------------------------------------------


AFTER INSTALLING JAVA 7.0 for WAS 8.5:


1. Confirm you have installed the WAS 8.5.x JDK 1.7.

You can bring up the following "installed.xml" file:
C:\ProgramData\IBM\Installation Manager\installed.{xml, xsl, xsd}
in a browser and it should show in this IM installed packages view.

In addition to the Java 6.0 folder: [WAS_HOME]\java,
there should be a new folder: [WAS_HOME]\java_1.7_{32|64}


Check the output from:
> {WAS_HOME}/bin/versioninfo.bat
or
> {WAS_HOME}\profiles\{server profile folder}\bin\versioninfo.bat
It should show some optional Java 7.0 version:
"..
....
Name IBM WebSphere SDK Java Technology Edition (Optional)
Version 7.0.9.0
...
.."

It does not mean a given server profile is using Java 7.0

2. switch the WAS 8.5 JDK from JDK 1.6 to 1.7 for a given server profile using
- managesdk command // traditional WAS v8.5 -- not for Liberty


Configure a server profile to use Java 7.0 32 bit or 64-bit:
– managesdk -enableProfile -sdkName 1.7_32 -profileName {PROFILE NAME} –enableServers

Confirm what Java versions is being used by the server profile:
> managesdk.bat -listEnabledProfile -profileName {PROFILE NAME}

Note: the server profile name is not necessarily the name of the folder it was created in. For example, the profile folder:
{WAS_HOME}\profiles\AppSrv01 may not be the name of the profile when it was created.
You will need to use the:
- manageprofiles command

To list available profile names use:
> {WAS_HOME}/bin/manageProfiles - listProfiles

and then get the profile path for a given profile name:
> {WAS_HOME}/bin/manageProfiles -getPath -profileName {PROFILE NAME}

If you know the profile path, then get the name using:
> {WAS_HOME}/bin/manageProfiles -getNameth -profilePath {PROFILE PATH}



Examples of the managesdk command, from:

- WAS IEA/Educate
-- IBM WebSphere Application Server V8.5 Java 7
http://publib.boulder.ibm.com/infocenter/ieduasst/v1r1m0/topic/com.ibm.ea.was_v8/was/8.5/ProgrammingModel/WAS85_Java7.pdf?dmuid=20120802121311217948

- Configuring single server environments for Java 7
* Useful for developer scenarios

* Verify Java 7 is available to use:
– managesdk -listAvailable

* Configure scripts to use Java 7 32 bit:
– managesdk -setCommandDefault –sdkName 1.7_32


* Configure profile to use Java 7 32 bit:
– managesdk -enableProfile -sdkName 1.7_32 -profileName AppSrv01 –enableServers

* Set default for profiles to use Java 7 32 bit:
– managesdk -setNewProfileDefault –sdkName 1.7_32

* Security options:
-user username –password password

-----------------------


As of WAS v8.5.5.9 there is support for Java 8.0.
Here is an example of an existing WAS 8.5.5.9 32-bit profile with Java 6.0. 7.0 and 8.0 installed, and a default of Java 6.0 changed to Java 8.0.

- List available SDKs:

C:\{WAS85-32bit Home}\profiles\AppSrv04-Java80\bin> managesdk -listAvailable
CWSDK1003I: Available SDKs :
CWSDK1005I: SDK name: 1.6_32
CWSDK1005I: SDK name: 1.7_32
CWSDK1005I: SDK name: 1.8_32
CWSDK1001I: Successfully performed the requested managesdk task.

Notes:
1. If this was a 64-bit install the SDK name would be: 1.n_64
2. As of WAS 8.5.5.2 there is also an optional IBM Java 7.1 (known as Release 1)== java_1.7.1_[64|32] SDK.
More on this at the end of this technote.

- Check what JDK the profile is enabled with:

C:\{WAS85-32bit Home}\profiles\AppSrv04-Java80\bin> managesdk -listEnabledProfile -profileName AppSrv04-Java80
CWSDK1004I: Profile AppSrv04-Java80 :
CWSDK1006I: PROFILE_COMMAND_SDK = 1.6_32
CWSDK1008I: Node {somehost}Node08 SDK name: 1.6_32
CWSDK1009I: Server server1 SDK name: 1.6_32
CWSDK1001I: Successfully performed the requested managesdk task.

- Enable it to use Java 8.0:

C:\{WAS85-32bit Home}\profiles\AppSrv04-Java80\bin> managesdk -enableProfile -sdkName 1.8_32 -profileName AppSrv04-Java80 -enableServers
CWSDK1017I: Profile AppSrv04-Java80 now enabled to use SDK 1.8_32.
CWSDK1001I: Successfully performed the requested managesdk task.

- Check again what JDK the profile is enabled with:

C:\{WAS85-32bit Home}\profiles\AppSrv04-Java80\bin> managesdk -listEnabledProfile -profileName AppSrv04-Java80
CWSDK1004I: Profile AppSrv04-Java80 :
CWSDK1006I: PROFILE_COMMAND_SDK = 1.8_32
CWSDK1008I: Node {somehost}Node08 SDK name: 1.8_32
CWSDK1009I: Server server1 SDK name: 1.8_32
CWSDK1001I: Successfully performed the requested managesdk task.
------------------------------




Specifying the JRE version for WAS v8.5 or WAS 8.5 stub in RAD v8.5+:


You will need to specify the Java/JRE version to be used by WAS v8.5 in RAD.

Note: RAD v8.5+ has an optional product feature when installing RAD to select the WAS 8.5 runtimes stub to be used for build purposes if a WAS 8.5 server has not been installed. The WAS v8.5 stub comes with both Java 6.0 and 7.0:
{RAD Install path}\SDP91-64\runtimes\base_v85_stub
..\java
..\java_1.7_64 (or \java_1.7_32 for a RAD 32 bit install)

In RAD v8.5+, for either a WAS v8.5 server of WAS v8.5 runtime stub you can set the JRE version as follows:

Window > Preferences > Server > Runtime Environments

Select the WebSphere Application Server v8.5 ( or Stub) server runtime environment and
click [Edit] and change the JRE using the dropdown in the field:
"JRE for the runtime environment"
to select:
WebSphere Application Server JRE 1.7, {32|64} bit
assuming you have installed the optional JRE 1.7,
or
WebSphere Application Server JRE 1.6, {32|64} bit


<<screenshot>>


The following information should also be updated for the WAS 8.5 JRE in:

Window > Preferences > Java > Installed JREs.

In any existing JEE project
RC on Project > Java Build Path: Libraries
The WAS 8.5 JRE should now show jars being on
{WebSphere Application Server v8.5 (or Stub) location}\java_1.7_{32|64}\jre

Note: It should not be necessary to delete the existing WAS85 JRE using [Remove] and add the WAS85 Stub Java 17 using:
[Add Libraries] > JRE System JRE : Alternate JDKs..dropdown
to change to the "WAS 85 (or Stub) java_1.7_64"


For WAS85 or WAS85stub targeted project, the
RC on Project > Properties > Project Facets : Java option : 1.7
should now be available.

-------------------------------------------------------------------------------------------------------------------------------
Another useful technote on the theme of Java Project Facet and WAS 8.5 JREs and using the managesdk command is:
- WebSphere Application Server JVM version shows as 1.6 for server configured with JRE 1.7 runtime in Rational Application Developer


===========================================================================
Information on WAS 8.5 Java 7.0 and 7.1:

- WAS IEA/Educate
-- IBM WebSphere Application Server V8.5 Java 7


- WAS85 Knowledge Center (KC) topics:

* WAS ND (or any traditional WAS):
- Installing and uninstalling SDK Java Technology Edition Version 7.0 or 7.1 on distributed operating systems
* Liberty:
- Installing and uninstalling SDK Java Technology Edition Version 7.0 or 7.1 for Liberty on distributed operating systems

"...
8.5.5.2: You can download and install IBM WebSphere SDK Java Technology Edition Version 7.1. This version and above versions are only available from the web. This version is not available on the product media. You have the following installation options:
•Download the installation files from the IBM Fix Central website and use a local installation.
•Access the live repositories and use your IBM Software ID for a web-based installation
..."

, and child topics with install details like:
-- Installing IBM WebSphere SDK Java Technology Edition Version 7.0 or 7.1 using the GUI


IBM Java 7.0 and 7.1 are Java 7 specification compliant JVMs.
If you are using IBM Java 7.0 , there is no need to install/change to 7.1, unless you need some of the new functions which are not relevant to application runtime behaviour in terms of the Oracle Java 7 specification. IBM Java 7.1 (version 7 Release 1) added some new features, but they do not and should not change the application runtime behaviour expected of Java 7 JVM , and should be similar to IBM Java 7.0. Refer to this IBM Java 7.1 KC topic for more information:
- IBM® SDK, Java™ Technology Edition, Version 7 Release 1 (Whats new)
, and it refers to :
-- IBM SDK, Java Technology Edition, Version 7 Release 1: Current news

So why IBM Java 7.1 when there is Java 7.0 and what is different and is it necessary? This is some information from IBM WAS(SDK) Support:

The Java 7.1 (referred to as IBM Java 7 Release 1) is a level between Java 7 and Java 8. At this time it is not documented as to why it was created and provided for WAS 8.5.5.2+, apart from possibly being a transition to Java 8.0 and the additional functionality referenced in 7.1 (above). You can stay with Java 7.0 with the latest fixpacks that continue to be provided for it. IBM Java 7.1 is a different JVM and therefore a separate install from Java 7.0. It is recommended to use Java 7.0, but now that Java 8.0 is out as of WAS 8.5.5.9, that could be another option. If you are using IBM Java 7.0, there does not appear to be a significant benefit to moving from IBM Java 7.0 to 7.1. There have been performance issues with 7.1. Unless there is a strong reason for using 7.1, stay with 7.0 for JVM consistency. You may consider Java 8.0 if moving on from Java 7.0 and want the latest Java 8 specification features.

If you need more information on IBM Java 7.1 with WAS 8.5.5.2+, submit a PMR to IBM WAS(SDK) support .
If you are on Java 7.0, continue to get the latest fixpacks.

[{"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"J2EE Tooling","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"8.5;8.5.1;8.5.5;8.5.5.1;8.5.5.2;9.0;9.0.1;9.0.1.1;9.1;9.1.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
17 June 2018

UID

swg21962198