Skip to main content



      Home
Home » Newcomers » Newcomers » Eclipse 4.12 build.compiler NoClassDefFoundError( java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/impl/CompilerOptions)
Eclipse 4.12 build.compiler NoClassDefFoundError [message #1808374] Sat, 22 June 2019 11:32 Go to next message
Eclipse UserFriend
Hello,

Our build script is running for a long time with no issues for Luna, (tested also in photon and 201812 eclipse.) However when we upgraded to eclipse 4.12 (201906), we encountered this error. Any idea, please advise. Thanks!

 java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/impl/CompilerOptions
        at org.eclipse.jdt.core.JDTCompilerAdapter.setupJavacCommand(JDTCompilerAdapter.java:101)
        at org.eclipse.jdt.core.JDTCompilerAdapter.execute(JDTCompilerAdapter.java:77)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1404)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1133)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.Target.execute(Target.java:449)
        at org.apache.tools.ant.Target.performTasks(Target.java:470)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
        at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
        at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:37)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at java.util.Vector.forEach(Vector.java:1275)
        at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:67)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        at org.apache.tools.ant.Task.perform(Task.java:350)
        at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:391)
        at net.sf.antcontrib.logic.ForTask.doSequentialIteration(ForTask.java:259)
        at net.sf.antcontrib.logic.ForTask.doToken(ForTask.java:268)
        at net.sf.antcontrib.logic.ForTask.doTheTasks(ForTask.java:299)
        at net.sf.antcontrib.logic.ForTask.execute(ForTask.java:244)

[Updated on: Sat, 22 June 2019 11:33] by Moderator

Re: Eclipse 4.12 build.compiler NoClassDefFoundError [message #1808379 is a reply to message #1808374] Sat, 22 June 2019 19:36 Go to previous messageGo to next message
Eclipse UserFriend
Which version of Java is running this? Can you post the ant file itself?
Re: Eclipse 4.12 build.compiler NoClassDefFoundError [message #1808380 is a reply to message #1808379] Sun, 23 June 2019 01:14 Go to previous messageGo to next message
Eclipse UserFriend
Hello, Please see below.

#### WINDOWS COMMAND
echo Setting up JAVA Environment..
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_211
set JRE_HOME=C:\Program Files\Java\jre1.8.0_211


####INVOKING ANT IN ECLIPSE
%ECLIPSE_HOME%\eclipsec.exe -noSplash --launcher.suppressErrors -application org.eclipse.ant.core.antRunner -buildfile %BUILDFILEPATH% %BUILDCFG%


###WHERE THE ANT SCRIPT IS THIS:
	<!-- Compiler settings. -->
	<property name="javacFailOnError" value="true" />
	<property name="javacDebugInfo" value="on" />
	<property name="javacVerbose" value="false" />
	<property name="logExtension" value=".log" />
	<property name="compilerArg" value="" />
	<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
	
	
	<path id="@dot.classpath">
		<!-- Order here matters for which jar libraries are used -->
		<fileset dir="lib" erroronmissingdir="false">
			<include name="**/*.jar" />
		</fileset>
		<fileset dir="${stageAreaFolder}/..">
			<include name="**/*.jar" />
		</fileset>
		<fileset dir="${eclipse.home}/plugins">
			<include name="**/*.jar" />
		</fileset>
		<dirset dir="${eclipse.home}/plugins">
			<include name="**/*" />
		</dirset>
	</path>
	

	<echo>Compiling classes for ${bundleId} with Java ${ant.java.version}</echo>
	<javac destdir="${build.result.folder}/@dot" failonerror="${javacFailOnError}" verbose="${javacVerbose}" debug="${javacDebugInfo}" includeAntRuntime="no" source="${ant.java.version}" target="${ant.java.version}">
		<classpath refid="@dot.classpath" />
		<src path="${srcpath}" />
		<compilerarg line="-log &apos;${build.result.folder}/@dot${logExtension}&apos; -warn:suppress" compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
	</javac>
Re: Eclipse 4.12 build.compiler NoClassDefFoundError [message #1808382 is a reply to message #1808380] Sun, 23 June 2019 04:04 Go to previous message
Eclipse UserFriend
Hello,

Prior to that error, just saw this details in the log file "java.lang.IllegalStateException: The instance data location has not been specified yet."

I tried to set eclipse.ini -Dosgi.dataAreaRequiresExplicitInit=false and it fixed the compilation error.

Thanks,
Lea
Previous Topic:Build [ERROR] Invalid extension descriptor for org.eclipse.tycho:tycho-maven-plugin:0.20.0
Next Topic:Hello I'm learning java ---- *.java to fxml code
Goto Forum:
  


Current Time: Tue Jul 08 03:50:32 EDT 2025

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

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

Back to the top