Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » RCP generation compiler issue(RCP generation with Eclipse SDK 4.2.2 and IBM JDK 1.7 problem)
RCP generation compiler issue [message #1249049] Mon, 17 February 2014 23:15 Go to next message
ADALZISO FRANCISCHINE is currently offline ADALZISO FRANCISCHINEFriend
Messages: 4
Registered: February 2014
Junior Member
I have used Eclipse SDK 4.2.2 and IBM JDK 1.6 to generate a RCP application. I have used a linux headless build.
After I updated IBM JDK from 1.6 to 1.7, I am having the following compiling error:

[java] Total time: 1 minute 58 seconds
[java] [javac] ----------
[java] [javac] 1. ERROR in "Name of the class".java (at line 0)
[java] [javac] /*
[java] [javac] ^
[java] [javac] The type java.lang.Class cannot be resolved. It is indirectly referenced from required .class files
[java] [javac] ----------
[java] [javac] 1 problem (1 error)

Is Eclipse SDK 4.2.2 compatible with IBM JDK 1.7 ?
Does anyone has any hints ?
Re: RCP generation compiler issue [message #1249221 is a reply to message #1249049] Tue, 18 February 2014 03:43 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3880
Registered: July 2009
Senior Member

It should be fine with it. Sounds like javac can't find, or otherwise read, the main runtime jar files that contain the standard class libraries. Are you able to run applications? Are "java" and "javac" both from IBM JDK 1.7?

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: RCP generation compiler issue [message #1252870 is a reply to message #1249221] Fri, 21 February 2014 17:41 Go to previous message
ADALZISO FRANCISCHINE is currently offline ADALZISO FRANCISCHINEFriend
Messages: 4
Registered: February 2014
Junior Member
Thanks for your answer.
java and javac are 1.7
I was not able to run any application. I got this problem while compiling the rcp plugin through a headless build.

I used the following properties file as a model for my project:
org.eclipse.pde.build_3.8.2.v20121114-140810\templates\headless-build\build.properties

I did not provide any value for the following properties:
############# JAVA COMPILER OPTIONS ##############
# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE
#bootclasspath=${java.home}/lib/rt.jar

# specific JRE locations to compile against. These values are used to compile bundles specifying a
# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support
#CDC-1.0/Foundation-1.0= /path/to/rt.jar
#CDC-1.1/Foundation-1.1=
#OSGi/Minimum-1.0=
#OSGi/Minimum-1.1=
#JRE-1.1=
#J2SE-1.2=
#J2SE-1.3=
#J2SE-1.4=
#J2SE-1.5=
#JavaSE-1.6=
#PersonalJava-1.1=
#PersonalJava-1.2=
#CDC-1.0/PersonalBasis-1.0=
#CDC-1.0/PersonalJava-1.0=
#CDC-1.1/PersonalBasis-1.1=
#CDC-1.1/PersonalJava-1.1=


Inspecting the build.xml generated by the eclipse PDE plugin that lead to the failure, I found that the following target had been the last one to be invoked:

<javac destdir="${build.result.folder}/@dot" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}"
includeAntRuntime="no" bootclasspath="${bundleBootClasspath}" source="${bundleJavacSource}"
target="${bundleJavacTarget}" errorProperty="compilation.error.occured" >
<compilerarg line="${compilerArg}" compiler="${build.compiler}"/>
<classpath refid="@dot.classpath" />
<src path="src/" />
<compilerarg value="@${basedir}/javaCompiler...args" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
<compilerarg line="-log &apos;${build.result.folder}/@dot${logExtension}&apos;" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
</javac>



The bootclasspath is set as: ${bundleBootClasspath}" that is built adding all jar files from the ${java.home}/lib. See how this property is set in the same build.xml file.



<property name="dir_bootclasspath" value="${java.home}/lib"/>
<path id="path_bootclasspath">
<fileset dir="${dir_bootclasspath}">
<include name="*.jar"/>
</fileset>
</path>
<property name="bootclasspath" refid="path_bootclasspath"/>
<property name="bundleBootClasspath" value="${bootclasspath}"/>


Setting ${bootclasspath} to compile java classes adding all jar files found under ${java.home}/lib used to work with IBM JDK 1.6, but it does not work anymore with IBM JDK 1.7
The reason is the fact the IBM JDK requires jar files that are not under ${java.home}/lib.
I run a small ant script file that compiles java classes outside the eclipse PDE environment to confirm that.

See the property ${sun.boot.class.path} for IBM JDK 1.6 and IBM JDK 1.7:


IBM JDK 1.6:
sun.boot.class.path : C:\jdk16\sdk\jre\lib\vm.jar;C:\jdk16\sdk\jre\lib\annotation.jar;C:\jdk16\sdk\jre\lib\beans.jar;C:\jdk16\sdk\jre\lib\java.util.jar;C:\jdk16\sdk\jre\lib\jndi.jar;C:\jdk16\sdk\jre\lib\logging.jar;C:\jdk16\sdk\jre\lib\security.jar;C:\jdk16\sdk\jre\lib\sql.jar;C:\jdk16\sdk\jre\lib\ibmorb.jar;C:\jdk16\sdk\jre\lib\ibmorbapi.jar;C:\jdk16\sdk\jre\lib\ibmcfw.jar;C:\jdk16\sdk\jre\lib\rt.jar;C:\jdk16\sdk\jre\lib\charsets.jar;C:\jdk16\sdk\jre\lib\resources.jar;C:\jdk16\sdk\jre\lib\ibmpkcs.jar;C:\jdk16\sdk\jre\lib\ibmcertpathfw.jar;C:\jdk16\sdk\jre\lib\ibmjgssfw.jar;C:\jdk16\sdk\jre\li
b\ibmjssefw.jar;C:\jdk16\sdk\jre\lib\ibmsaslfw.jar;C:\jdk16\sdk\jre\lib\ibmjcefw.jar;C:\jdk16\sdk\jre\lib\ibmjgssprovider.jar;C:\jdk16\sdk\jre\lib\ibm
jsseprovider2.jar;C:\jdk16\sdk\jre\lib\ibmcertpathprovider.jar;C:\jdk16\sdk\jre\lib\management-agent.jar;C:\jdk16\sdk\jre\lib\xml.jar;C:\jdk16\sdk\jre\lib\jlm.jar;C:\jdk16\sdk\jre\lib\javascript.jar

IBM JDK 1.7:
sun.boot.class.path : C:\JDK17_x86-64\sdk\jre\bin\compressedrefs\jclSC170\vm.jar;C:\JDK17_x86-64\sdk\jre\lib\se-service.jar;C:\JDK17_x86-64\sdk\jre\lib\math.jar;C:\JDK17_x86-64\sdk\jre\lib\jlm.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmorb.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmorbapi.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmcfw.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmpkcs.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmcertpathfw.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmjgssfw.jar;C:\JD
K17_x86-64\sdk\jre\lib\ibmjssefw.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmsaslfw.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmjcefw.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmjgssprovider.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmjsseprovider2.jar;C:\JDK17_x86-64\sdk\jre\lib\ibmcertpathprovider.jar;C:\JDK17_x86-64\sdk\jre\lib\xmldsigfw.jar;C:\JDK17_x86-64\sdk\jre\lib\xml.jar;C:\JDK17_x86-64\sdk\jre\lib\charsets.jar;C:\JDK17_x86-64\sdk\jre\lib\resources.jar;C:\JDK17_x86-64\sdk\jre\lib\rt.jar


To solve the problem I added the following property in the build.properties for my project:
bootclasspath=${sun.boot.class.path}

This property overwrote the one PDE was using by default (jar files from the "${java.home}/lib")

I will post an entry in the PDE forum to check if anyone else has had this problem.
Previous Topic:DirContext
Next Topic:Debug mode not working properly
Goto Forum:
  


Current Time: Mon Oct 26 22:50:52 GMT 2020

Powered by FUDForum. Page generated in 0.02434 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top