Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » RCP generation with Eclipse SDK 4.2.2 problem(RCP generation with Eclipse SDK 4.2.2 problem with IBM JDK 1.7)
RCP generation with Eclipse SDK 4.2.2 problem [message #1252899] Fri, 21 February 2014 18:28
ADALZISO FRANCISCHINE is currently offline ADALZISO FRANCISCHINEFriend
Messages: 4
Registered: February 2014
Junior Member
RCP generation with Eclipse SDK 4.2.2 problem
I have used Eclipse SDK 4.2.2 and IBM JDK 1.6 to generate a RCP application through eclipse PDE. I have used a linux headless build.
After I updated IBM JDK from 1.6 to 1.7, I start having the following compiling error:

[java] Total time: 1 minute 58 seconds
[java] [javac] ----------
[java] [javac] 1. ERROR in ...J2eeConfigurationAction.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)

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.ja
r;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\i
bmorb.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\sd
k\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\li
b\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\jr
e\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\ib
mjgssprovider.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\xml
dsigfw.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")

Has anyone had the same problem ?

Adalziso Francischine
IBM Software Group
Previous Topic:Executing PDE Test from the command line
Next Topic:RCP generation with Eclipse SDK 4.2.2 problem
Goto Forum:
  


Current Time: Thu Apr 25 12:54:46 GMT 2024

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

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

Back to the top