Skip to Content
Author's profile photo Szabolcs Renyo

Configuring JDK settings with NWDI

Disassembling the puzzle


Recently I realized that we receive more and more incidents where even despite very good product documentation, the problem is at the end with improperly configured JDK settings. In order to help our customers I thought it’s time to write a holistic blog post explaining how to configure NWDI that supports development for multiple track releases (which determines the JDK versions at the same time).


Follow this guide how to configure NWDI to use different JDKs per Track.

There are three major settings to be configured:

  • A Build Variant configurable per Track (in NWDI)
  • Two CBS Service properties (in NWA):

For now, without going into any details, on the below abstract figure, you can see the relationship of these settings:


  • BUILD_TOOL_JDK_HOME has to point to the highest available JDK
  • JDK_HOME_PATHS defines 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.
  • The key default is optional
    • If the default key is set, then it is taken into consideration only, in case no Build Variant has been defined
  • The build will fail if
    • No matching JDK_HOME_PATHS key available
    • Build Variant mistyped



On the halfway completing the puzzle


Now let’s take a look at the same figure with less abstract data but still without any exact configuration details (how to do this in NWA, etc)


In this example we plan to develop for the following releases:

  • In TRACK_1 for 7.50
  • In TRACK_2 for 7.02
  • In TRACK_3 for 7.30
  • In TRACK_N for 7.20

Set the Build Variants in CMS this way:

  • For TRACK_1 specify Build Variant = JDK1.8.0_HOME
  • For TRACK_2 specify Build Variant = JDK1.4.2_HOME
  • Do not specify Build Variant for TRACK_3
  • For TRACK_N specify Build Variant = JDK1.5.0_HOME


Set the CBS settings in NWA this way:

  • BUILD_TOOL_JDK_HOME = C:\Java\java8
  • JDK_HOME_PATHS = JDK1.8.0_HOME=C:\Java\JDK1.8; JDK1.4.2_HOME=C:\Java\JDK1.4.2; default=C:\Java\JDK1.6

As a result:

  • TRACK_1 is going to use JDK1.8
  • TRACK_2 is going to use JDK1.4
  • TRACK_3 is going to use JDK1.6 because no Build Variant defined
  • TRACK_N build is going to fail because there is no key-value pair JDK1.5.0_HOME available in CBS Settings
Benefit using default

Another benefit of using default is if there are many tracks and the majority of them is using the same Build Variant.


If you have 10 Tracks out of which 9 are using JDK1.6 and only 1 Track is using JDK1.8 then specify a build variant “” only for that Track that is using JDK1.8 and setup CBS settings as follows (and do not specify Build Variant for the other 9 Tracks):

JDK_HOME_PATHS = JDK1.8.0_HOME = C:\Java\JDK1.8; default= C:\Java\JDK1.6

Use the below table to decide which build variants to use for which release:

Track 71X uses JDK1.5

Track 720 uses JDK1.5

Track 73X uses JDK1.6

Track 740 uses JDK1.6

Track 750 uses JDK1.8


The last puzzle pieces (where to do the configuration)

After understanding the theory now let’s see where to do the actual configuration in NWA and NWDI

Required configuration in NWDI (CMS)

The Build Variant of the track can be set in http://<host>:<port>/devinf  –> “Change Management Service (CMS)” –> “Landscape Configurator” –> Select your track –> ”Track Data” –> ”Build Variants”


 In case if you use CM Services instead of CMS the Build Variant can be set in http://<host>:<port>/devinf –> “CM Services” –> Select your System –> click on tab “Software Component Definition” –> Select your SC –> expand the “Build options for software component”.

Required configuration in NWA


In the CBS Service settings (http://<host>:<port>/nwa/sys-config -> select the tab “Services” –> look up “Component Build Service”).

Notice that these settings are relevant only for 7.1+.

7.0x or below: check these settings in Visual Administrator’s service “Component Build Service”.


  • Filter for the property BUILD_TOOL_JDK_HOME and set its value to the path of the highest available JDK version (the bin folder where the executable “javac” is located).
  • For JDK_HOME_PATHS define key=value pairs separated by semicolon (“;”).


Hint: filter for the word “home” in order to display both of the parameters as seen below:


What if my settings are wrong?

If the discussed settings are not correct then you might face the following possible problems:

  • Unsupported major.minor (above discussed wrongly set up JDK versions can lead to the case where a classfile built with a higher JDK cannot be executed by a JVM expects lower classfile version)
  • Build request are stucking in the queue
  • Activation (or direct DC build) fails. This case the Request log displays errors and no Build log available.

E.g. Error! The following error occurred during request processing: Could not find valid JDK home path value for key <your invalid key> to start build controller

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Ervin Szolke
      Ervin Szolke

      Cool blog, Szabolcs! 😉

      Let me also connect more dots by adding here a thread that also covers couple of points in this topic Installing JDK 6 (1.6.0_21) on SAP NWDI - CBS

      Author's profile photo Milen Dontcheff
      Milen Dontcheff

      ... outstanding!

      Very well written and very well screen-shot supported.

      Hopefully this minor.major error messages will go in the history.

      Author's profile photo Szabolcs Renyo
      Szabolcs Renyo
      Blog Post Author

      Thank you, Guys! 🙂

      Author's profile photo Hemanth Kumar
      Hemanth Kumar

      Great work Szabolcs 🙂

      Author's profile photo Former Member
      Former Member

      "the folder where the executable “javac” is located"


      Is this really true? usually jdk home parameters are set to the installation directory, not the /bin directory...

      Since there is no validation when entering the parameters, I'd appreciate if the explanatory notes were 100% correct.

      Author's profile photo Szabolcs Renyo
      Szabolcs Renyo
      Blog Post Author

      Hello Karsten,

      Thank you for the feedback. I will correct it in a sec.

      Best Regards,


      Author's profile photo Matthias Hollstein
      Matthias Hollstein

      path should be the location of the bin folder where the executable “javac” is located. Path must not contains /bin.

      For Example: "JDK1.8.0_HOME=E:\usr\sap\SID\J00\exe\sapjvm_8;default=E:\usr\sap\SID\J00\exe\sapjvm_8"

      if /bin is used, auto generated paths are containing /bin/bin - and this is not correct (see picture below).



      Author's profile photo Former Member
      Former Member

      Another feedback, that I can give after spending hours to figure out why many of our activations failed:

      BUILD_TOOL_JDK_HOME should NOT be set to your highest JDK. While the compiler would be forked with BUILD_TOOL_JDK_HOME set to JDK8 and the build variant pointing to JDK1.4 (for example for 7.0 Tracks), JDK8 would be used for the build tool which produced cryptic errors in Web Dynpro DC builds.

      The solution is just leaving BUILD_TOOL_JDK_HOME empty, then JDK_HOME_PATHS gets evaluated and the DCs are built correctly.

      Author's profile photo Szabolcs Renyo
      Szabolcs Renyo
      Blog Post Author

      Hello Karsten,

      Thank you so much for your observation. I'm going to discuss it with my developer colleagues.

      Best regards,

      Author's profile photo Former Member
      Former Member


      I could not find Component Build Service under Services in Java System Properties of NWA in NW750 version. Please help.



      Author's profile photo Szabolcs Renyo
      Szabolcs Renyo
      Blog Post Author

      Dear Dinesh,


      I would suggest that use the SAP Community Questions & Answers - (registration required) with primary tag "NW Java Development Infrastructure (NWDI)" 


      Here you can ask the same question.


      Best regards,



      Author's profile photo Omri Cohen
      Omri Cohen

      After importing track from 7.31 (JVM 1.6) to 7.5 (JVM 8) I got compiler errors:

      To fix it, you need to change JVM settings of track level in NWDS 7.5 (it took me a lot of time to find it since it's not (well) documented )-: