cancel
Showing results for 
Search instead for 
Did you mean: 

Local EJB3 DC builds use a 1.4 compiler

rosh
Participant
0 Kudos

Hello,

my NWDS 7.10 was configured to use a JDK 1.4 for some time. Now I want to build an EJB 3 Project in a Local Development DC. The problem is that the studio still uses the 1.4 compiler when I trigger a build with Development Component -> build and does cannot compile Java 5 code.

I have already checked Window -> Preferences -> Development Infrastructure -> DC Build as well as Window -> Preferences -> Java -> Installed JREs, deleted the 1.4 entries and have both point to 1.5 compilers.

Below are the details of an empty EJB3 Project build:

Development Component Build (2008-08-14 15:25:42 GMT+01:00 (CEST))
  Component name: sample
  Component vendor: demo.sap.com
  SC compartment: MyComponents
  Configuration: LocalDevelopment
  Location: localDevelopment
  Source code location: [...]
  DC root folder: [...]\LocalDevelopment\DCs\demo.sap.com\sample\_comp\
  DC type: J2EE
  DC subtype: EJBModule
  Host: [...]

DC Model check:
   DC is available locally
   validating dependency to build plugin "sap.com/tc/bi/bp/ejbmodule"
   validating dependency to  public part "api" of DC "sap.com/engine.jee5.facade"
   DC model check OK

Start build plugin:
   using build plugin: sap.com/tc/bi/bp/ejbmodule
   starting build plugin from : [...]\LocalDevelopment\SAP_BUILDT\sap.com\tc\bi\bp\ejbmodule\_comp\gen\default\public\ejb\



Build Plugin 'EJBModulePlugin', Version 7.10 SP 5 (NW07_05_REL, built on 2008-02-23 14:17:39 +0100, CL15689)
   development component:  sample (demo.sap.com)
      software component:  MyComponents (demo.sap.com)
                location:  localDevelopment
                    type:  J2EE, subtype EJBModule
           build variant:  default
         source location:  I5632@BFEN289
         output location: [...]\LocalDevelopment\t2\58863262F718CEDBB34C7F3A7EE37F53\default
       generation folder:   [...]\LocalDevelopment\t\58863262F718CEDBB34C7F3A7EE37F53
       plugin start time:  2008-08-14 15:25:42 GMT+01:00 (CEST)
                 Java VM:  Java HotSpot(TM) Client VM, 1.5.0_15-b04 (Sun Microsystems Inc.)
General options:
  convert *.xlf to *.properties: yes
  include sources for debugging: yes

Checking path lengths for sources
Path length checks finished in 0 seconds

Preparing data context..
No public part descriptor found in  [...]\workspace.jdi.jdi\LocalDevelopment\ENGFACADE\sap.com\engine.jee5.facade\_comp\gen\default\public\api, using legacy mode.
Using custom manifest file "ejbModule/META-INF/MANIFEST.MF"
Data context preparation finished in 0.078 seconds

Creating Ant build file..
  Creating output file:  [...]\LocalDevelopment\t2\58863262F718CEDBB34C7F3A7EE37F53\default\logs\build.xml
  Using Java class:     com.sap.tc.buildplugin.BuildEJBModule
Build file creation finished in 0.047 seconds

Starting Ant..
  Using build file:      [...]\LocalDevelopment\t2\58863262F718CEDBB34C7F3A7EE37F53\default\logs\build.xml
  Using build target:   build
  Using Ant version:    1.6.4

compile:
      [echo] Forking Java compiler as a new process: C:\j2sdk1.4.2_15\bin\javac.exe
      [echo] Settings:
      [echo]   debug:       on
      [echo]   optimize:    off
      [echo]   deprecation: default
      [echo]   verbose:     default
      [echo]   encoding:    UTF8
      [echo]   source:      1.4
      [echo]   target:      1.4
      [echo]   source path:  [...]\LocalDevelopment\DCs\demo.sap.com\sample\_comp\ejbModule
      [echo]   class path:
      [echo]      [...]\LocalDevelopment\ENGFACADE\sap.com\engine.jee5.facade\_comp\gen\default\public\api\lib\java\ec~java~jsf.jar
      [echo]      [...]\LocalDevelopment\ENGFACADE\sap.com\engine.jee5.facade\_comp\gen\default\public\api\lib\java\engine.jee5.facade.jar
      [echo]   output dir:   [...]\LocalDevelopment\t\58863262F718CEDBB34C7F3A7EE37F53\classes
     [timer] Java compilation finished in 0.016 seconds

      [echo] Start XLF conversion
     [timer] XLF conversion finished in 0 seconds


createPublicParts:
  [pppacker] Packing public part 'client'
  [pppacker] Packed   0 files for entity demo.sap.com~sample_client (EJB-Client-JAR)
  [pppacker] Packed 1 entity for public part 'client'
     [timer] Packing of public part 'client' finished in 0.016 seconds

  [pppacker] Packing public part 'ejbjar'
  [pppacker] Packed   2 files for entity demo.sap.com~sample (EJB-JAR)
  [pppacker] Packed 1 entity for public part 'ejbjar'
     [timer] Packing of public part 'ejbjar' finished in 0.046 seconds


Ant runtime 0.125 seconds

Ant build finished OK

Build plugin finished at 2008-08-14 15:25:43 GMT+01:00 (CEST)
Total build plugin runtime: 0.359 seconds

Build finished OK

==== Post-Processing ====   started at 2008-08-14 15:25:43.213 CEST
Comparison of previous and actual build results took: 0 seconds

Copy the build results 
  from:  [...]\LocalDevelopment\t2\58863262F718CEDBB34C7F3A7EE37F53\default\
  to:    [...]\LocalDevelopment\DCs\demo.sap.com\sample\_comp\gen\default\

Deleting all workspaces, saved setings and NWDS followed by a reinstall might fix it. But maybe somebody knows where the compiler settings for a DC build are stored.

Thanks for your help!

Accepted Solutions (0)

Answers (4)

Answers (4)

rosh
Participant
0 Kudos

Ok, I found it...

There's a small sly file jdkPreferences.txt lurking in the workspace/LocalDevelopment folder. I changed it from

#JDK Properties for Configuration LocalDevelopment
#Tue Jun 24 10:32:21 CEST 2008
jdk_source=1.4
jdk_path=C\:\\j2sdk1.4.2_15
jdk_target=1.4

to

#JDK Properties for Configuration LocalDevelopment
#Tue Jun 24 10:32:21 CEST 2008
jdk_source=1.5
jdk_path=C\:\\Programme\\Java\\jrockit-R27.4.0-jdk1.6.0_02
jdk_target=1.5

and now my Local Components can be built.

rosh
Participant
0 Kudos

no, it's C:\jdk1.5.0_15. I've also configured ANT_HOME to apache-ant-1.7.0 but i think the eclipse ant plugin is used for the build.

rosh
Participant
0 Kudos

Hi Pascal,

thanks for your answer.

The shortcut is D:\Programme\SAP\IDE\CE\eclipse\SapNetweaverDeveloperStudio.exe -vm "C:\jdk1.5.0_15\bin\javaw.exe" - looks good to me.

SapNetweaverDeveloperStudio.ini does not contain any 1.4 references either.

Former Member
0 Kudos

JAVA_HOME?

Former Member
0 Kudos

Check the Target of your NWDS shortcut that you use to start NWDS.