cancel
Showing results for 
Search instead for 
Did you mean: 

How to compile Web Dynpro DC with -source 1.4

Amey-Mogare
Contributor
0 Kudos

Hi,

I have installed SAP NWDS SP18 (previously I had SP15).

I am using KM APIs in my Web Dynpro DC and its not able to build it in NWDS SP18.

I get following build error:-


    [javac] Compiling 30 source files to C:\Documents and Settings\A171406\.dtc\LocalDevelopment\t\C196B8652AFFB25E7486C93C46A9FD14\classes
     [javac] ERROR: C:\Documents and Settings\A171406\.dtc\LocalDevelopment\t\C196B8652AFFB25E7486C93C46A9FD14\
gen_wdp\packages\com\amey\ldapp\components\ldacomp
\LdaComp.java:50: as of release 1.5, 'enum' is a keyword, and may not be used as an identifier
     [javac] ERROR: (try -source 1.4 or lower to use 'enum' as an identifier)
     [javac] ERROR: import com.sapportals.wcm.repository.enum.LinkType;
     [javac] ERROR:                                      ^
     [javac] 1 error

To resolve this, I went to following location and changed it to Java 1.4:-


Windows >> Preferences >> Java >> Installed JREs

But still I see that NWDS is picking up Java VM 1.5 only (may be based on following) :-


Windows >> Ant >> Runtime >> Classpath >>  u201DC:\Programs Files\SAP\IDE\IDE70\eclipse\plugins\org.apache.ant_1.5.3u201D >> ant.jar
Windows >> Ant >> Runtime Classpath>> u201DC:\Programs Files\SAP\IDE\IDE70\eclipse\plugins\org.apache.ant_1.5.3u201D >>  optional.jar
Windows >> Ant >> Runtime >> Classpath >> u201DC:\Program Files\Java\jdk1.5.0_16\libu201D >> tools.jar

Is there any way by which I can make my Java1.4 source code compile in NWDS SP18?

Please help.

Thanks and regards,

Amey Mogare

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

change the JRE just for your DC, go to:

- context menu on your DC -> Properties -> Java Build Path -> Libraries

and change here JRE to 1.4

Regards,

--

Przemysław

Amey-Mogare
Contributor
0 Kudos

Hi Przemysław,

Thanks for reply.

Can see this when I go to "DC right-click >> properties >> Java Build Path >> Libraries"


JRE_LIB - C:\Program Files\Java\jdk1.5\jre\lib\rt.jar

What change do I have to make?

Thanks and regards,

Amey Mogare

Former Member
0 Kudos

Hi,

you have to use other variable that is pointing to Java 1.4 or create new one.

As you see, you are still using Java 1.5.

- select JRE_LIB and press Edit button on the right

- choose "Variable" button

- choose another variable which points to JRE 1.4 or create new one.

After that next build should be successfull.

Regards,

--

Przemysław

Answers (0)