cancel
Showing results for 
Search instead for 
Did you mean: 

Installing JDK 6 (1.6.0_21) on SAP NWDI - CBS

Former Member
0 Kudos

Hello Experts.

I have got a new project now:

I want to generate a JSP and deploy it on SAP NetWeaver Portal 7.3.

First of all, I installed NetWeaver Developer Studio 7.3 with JDK 1.6.0_21.

We are using a NWDI 7.01 SP 7.

My Problem:

On our SAP NetWeaver Portal 7.3 is a JDK 6 (1.6.0_21) running.....When I create a new Track in our NWDI, it has to be build by the Component Build Service also with JDK 6....

Can you tell me, how I set up the required JDK only for that new Track - but not as default for all Tracks in the NWDI.

P.S. It would be also very nice, if someone could confirm me, that the only required Software Component (SC) I need for deploying on NW Portal 7.3 is called: "SAP BUILD TOOL 7.3".

Accepted Solutions (1)

Accepted Solutions (1)

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Maximilian,

could you please mark the thread as answered?

Thank you and Regards,

Ervin

Answers (5)

Answers (5)

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

1. Regardint the question

What does this mean: BUILD_TOOL_JDK_HOME = /opt/jdk16

CBS uses two service properties to configure JDKs used for the build: BUILD_TOOL_JDK_HOME and JDK_HOME_PATHS. These two settings combined with build options in the development configuration determine which JDK is used when compiling Java sources during a DC build.

The BUILD_TOOL_JDK_HOME property determines the VM that executes the build environment including Ant. Due to compatibility restraints this VM should be configured to the highest version available or used on the CBS. If you want to use higher equal than 720 build plugins you must use JDK6.0, if you use 710, 711 build plugins you must use a JDK5.0 here, for older releases (NW04/NW04s) a JDK1.4 is sufficient. (The typical symptom that the build tool JDK should be updated is an error reporting something like "unsupported major.minor version 49.0 ...")

The JDK_HOME_PATHS property defines a list of key-value pairs where the key is typically something like JDK<version>_HOME and the corresponding value is the path where the JDK is actually installed on the server. There is also the special key default that defines which JDK should be used as default.

The JDK that is used for the Java compiler is determined using the following logic:

If the build option com.sap.jdk.home_path_key is set to a valid key in JDK_HOME_PATHS then that JDK is used to fork the Java compiler.

For legacy support the build option ant_jdk_version is checked as fallback and if a valid key in JDK_HOME_PATHS exists with JDK<ant_jdk_version>_HOME then that JDK is used.

If a default JDK is defined in JDK_HOME_PATHS then that JDK is used.

If the JDK that will be used is different from the BUILD_TOOL_JDK_HOME the Java compiler will automatically be forked as a separate process. To determine if the two JDKs are different the installation paths are compared.

2. Regarding your question

Do I exactyl have to put the settings in my NWA as you decribed ?

Yes, with the exception, that what I wrote it was an example regarding the jdk path, i.e. if you set up as I described it will work.

Obviously instead of /opt/jdk16 and /opt/jdk14 you have to specify the location where your basis team installed JDK1.6 and JDK1.4.2, so more precisely:

BUILD_TOOL_JDK_HOME = <path to your JDK1.6>

JDK_HOME_PATHS = JDK1.6.0_HOME=<path to your JDK1.6>;default=<path to your JDK1.4.2>.

Best Regards,

Ervin

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

let me give you an example:

in CMS you have

TRACK1 -- 700 -- no build variant defined, default

TRACK2 -- 700 -- no build variant defined, default

TRACK3 -- 700 -- no build variant defined, default

TRACK4 -- 700 -- no build variant defined, default

TRACK5 -- 730 -- build variant defined and looks like this: com.sap.jdk.home_path_key = JDK1.6.0_HOME

In CBS Settings you have:

BUILD_TOOL_JDK_HOME = /opt/jdk16

JDK_HOME_PATHS = JDK1.6.0_HOME=/opt/jdk16;default=/opt/jdk142

- Whenever you build, for the first 4 track JDK1.4 will be used, for the 5th (TRACK5) JDK1.6 will be used.

- As of this moment no need to enhance the CBS Service settings.

- If you create a new 700 track, you don't specify build variant, so it will automatically use JDK1.4

- If you create a new 730 track, you specify build variant like in TRACK5, so it will use JDK1.6

Best Regards,

Ervin

Former Member
0 Kudos

Goor Morning Erwin!

Thanks for your Example, this is the best way to explain somebody complex topics:)

I have still a question about the CBS Service Settings in the NetWeaver Administrator:

1. What does this mean: BUILD_TOOL_JDK_HOME = /opt/jdk16

2. Do I exactyl have to put the settings in my NWA as you decribed ?

In CBS Settings you have:

BUILD_TOOL_JDK_HOME = /opt/jdk16

JDK_HOME_PATHS = JDK1.6.0_HOME=/opt/jdk16;default=/opt/jdk142

Regards

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

by the way, needless to say, that of course your BASIS team has to install JDK1.6 on that system else, you won't be able to specify the path in the CBS Service settings to JDK1.6.

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

if you have only 1 track where you developer of 720 or 730 and therefore there you want to use JDK1.6, no problem, the solution is easy.

Let's say you have 16 tracks all together.

15 tracks where you develop for 700 (JDK1.4) and 1 track where you develop for 730 (JDK1.6).

Proceed this way:

1. set the build variant parameter in the landscape configurator only for the 730 track and leave untouched for all the other 15 700 tracks.

2. In the CBS settings ensure that you have a default value for the JDK_HOME_PATHS parameter specified, see my previous anwer for that.

Now what will happen is that for the 15 tracks it'll use the default value (since you did not specify it explicitly) and since there is a default value pointing to JDK1.4.2, all those tracks will use JDK1.4.2. The 1 730 track on the other hand has a build variant for 1.6, and it also has its settings in CBS. So NWDI will know which track will use which JDK, and it is not a lot of effort, since you use the advantage of the default variable, and by this you only need to maintain the build variant for the 730 track. The CBS Service settings has to be setup of course, but you need to do this only once anyway.

Now where are the CBS Settings?

If it is about a 700 NWDI, then you find a service "Component Build Service" in Visual Admin (example: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/53/75b3407e73c57fe10000000a1550b0/frameset.htm).

If it is higher than 711 then you find it in NWA, simply type in its search field on the main NWA screen: "System Properties" or "Java System Properties" (I rather write this way, because the name and navigation path can be slightly different depending on your release), and in this configuration click on the tab "Services" and look for the service "Component Build Service".

I hope this helps.

Regards,

Ervin

Former Member
0 Kudos

Hello Ervin!

You are the Greatest. Thank you for writing such a detailled and understandable answer.

My SAP-BASIS has now installed the JDK 1.6.0 on the system.

The path in the NetWeaver Administrator of JDK_HOME_PATHS is now to JDK 1.6.0, as you described in your last answer.

In the CMS -> Landscape Configurator -> Build Variants I have also set the "name" and the "value" as you described.

But there's still something I don't understand:

I set up the JDK_HOME_PATHS to JDK 1.6.0 for the CBS in the NW Administrator, as I said.

Does that mean, that all TRACKS i will generate in the future (which I want to deploy on a 7.00 system), will be build with JDK 1.6.0, when I set "Default" in the Build Variants of the CMS ?

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

1.

if you go to the Track Data in the CMS webui -- Landscape Configurator then there you will find a tab called build variants.

For the 730 tracks you need to specify a parameter this way:

com.sap.jdk.home_path_key = JDK1.6.0_HOME

2. In the CBS Service settings you need to specify the following parameters this way

a) set BUILD_TOOL_JDK_HOME to the highest value (in your case this is the <path of JDK1.6>

b). list all JDKs for JDK_HOME_PATHS i.e.

JDK_HOME_PATHS = JDK1.3.1_HOME=<path of jdk131>;JDK1.4.2_HOME=

<path of jdk142>;JDK1.5.0_HOME=<path of jdk150>;JDK1.6.0_HOME=

<path of jdk160>;default=<path of the JDK as default>

(notice, this way you can influence which track will use which JDK, since you specify in the given track the com.sap.jdk.home_path_key to the arbitary JDK parameter. Its physical location is then specified in the CBS Service settings using the JDK_HOME_PATHS).

Regarding your other question please refer to the note:

#1457908 - Required SCs for Specific Type of Development in 7.3 Track

(http://service.sap.com/sap/support/notes/1457908)

Best Regards,

Ervin

Former Member
0 Kudos

Hello Ervin!

First of all, thank you for your great answer.

I understand what you mean but stil have another question:

- I have very much TRACKS, which I can see in the CMS (Landscape Configurator).

- But only 1 TRACK has to be deployed on a system with JDK 1.6.0, the other TRACKS were deployed on a system with a lower JDK.

=> So: Is it not enough, when I specify the paramter in the build variants in this TRACK, as you described in your answer?

Do I also have to specify the parameters in the CBS Service Settings as you described?

If I really have to do this, can you tell me

a) how I can get to the CBS Service Settings

b) Does my SAP-BASIS first has to install the JDK 1.6.0 on the filesystem of the NWDI-SAP-System?

Thank you very much for helping.