Hi
Eclipse provides many opportunities to select your Java version;
you have probably missed one.
Does Window->Preferences->Java->Installed JREs show a
Java 8 JRE available and preferably the default
Does Window->Preferences->Java->Installed
JREs->Execution Environments show that your J**E is mapped to a
Java 8
Does your project use Java 8 on its classpath (look at the [J**E]
suffix on the JRE in the Package Explorer)
Does your Ant launch use Java 8? Run->Externals
Tools->External Tools Configuration...->'MyAntBuild'->JRE
Regards
Ed Willink
On 09/02/2018 06:54, Sarika Sinha
wrote:
Hi,
Eclipse 4.6.3 supports Ant 1.10.1 for which
minimum java version required is 1.8.
You can try using a previous version of Ant to
check if that is the cause.
(Preferences->Ant->Runtime)
Thanks & Regards,
Sarika
"Rohit M Pujar1"
---02/07/2018 02:12:22 PM---Hi Team, I have been able to load
my old eclipse 3.7.2 projects into 4.6.3 on
From: "Rohit
M Pujar1" <Rohit.Pujar@xxxxxxxxxx>
To: eclipse-dev@xxxxxxxxxxx
Date: 02/07/2018
02:12 PM
Subject: [eclipse-dev]
Eclipse 4.6.3 compilation issues
Sent by: eclipse-dev-bounces@xxxxxxxxxxx
Hi Team,
I have been able to load my old eclipse 3.7.2 projects into
4.6.3 on Windows and could launch my application successfully.
The application was previously bundled with eclipse 3.7.2
plugins & compiled using java 1.6.
Now when trying to use java 1.8 and eclipse 4.6.3 plugins,
compilation fails. There are few number of .java files in my
application.
The error encountered is -
[javac] ERROR in
C:\view\app\build\toolkit\plugins\com.comp.dep.tool.engine\src\com\comp\dep\tool\engine\util\Messages.java
(at line 0)
[javac] /* Text description
[javac] ^
[javac] The type java.lang.Exception cannot be resolved. It is
indirectly referenced from required .class files
BUILD FAILED
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\productBuild\productBuild.xml:43:
The following error occurred while executing this line:
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\build.xml:105:
The following error occurred while executing this line:
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\templates\headless-build\customTargets.xml:13:
The following error occurred while executing this line:
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\productBuild\allElements.xml:20:
The following error occurred while executing this line:
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\genericTargets.xml:119:
The following error occurred while executing this line:
C:\Eclipse463\Build\target\eclipse\plugins\org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\genericTargets.xml:124:
The following error occurred while executing this line:
C:\view\app\build\toolkit\features\org.eclipse.pde.build.container.feature\build.xml:30:
The following error occurred while executing this line:
C:\view\app\build\toolkit\features\org.eclipse.pde.build.container.feature\build.xml:16:
The following error occurred while executing this line:
C\view\app\build\toolkit\features\com.comp.dep.tool.ui.feature\build.xml:63:
The following error occurred while executing this line:
C:\view\app\build\toolkit\eatures\com.comp.dep.tool.ui.feature\build.xml:19:
The following error occurred while executing this line:
C:\view\app\build\toolkit\plugins\com.comp.dep.tool.engine\build.xml:161:
The following error occurred while executing this line:
C:\view\app\build\toolkit\plugins\com.comp.dep.tool.engine\build.xml:122:
Compile failed; see the compiler error output for details.
at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:568)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:443)
at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at
org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)
at
org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:705)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:568)
... 19 more
Looking into the build script
[C:\view\app\build\toolkit\plugins\com.comp.dep.tool.engine\build.xml],
where the compilation error occurred -
<!-- compile the source code -->
<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
'${build.result.folder}/@dot${logExtension}'"
compiler="org.eclipse.jdt.core.JDTCompilerAdapter" />
</javac>
One observation here is - the value of ${bundleJavacSource}
& ${bundleJavacTarget} are not being set. Though the
following entry exists in the build.xml -
<condition property="bundleJavacSource" value="1.8" >
<isset property="JavaSE-1.8"/>
</condition>
<condition property="bundleJavacTarget" value="1.8" >
<isset property="JavaSE-1.8"/>
</condition>
<property name="bundleJavacSource"
value="${javacSource}"/>
<property name="bundleJavacTarget"
value="${javacTarget}"/>
This build.xml file
[C:\view\app\build\toolkit\plugins\com.comp.dep.tool.engine\build.xml]
is being generated as part of the eclipse plugin -
org.eclipse.pde.build_3.9.200.v20160204-0642\scripts\genericTargets.xml
file and using below target -
<!--
=====================================================================
-->
<!-- Generate a build.xml file for an element -->
<!--
=====================================================================
-->
<target name="generateScript" description="Generating build
scripts..." depends="init">
<eclipse.buildScript
elements="${type}@${id}"
buildDirectory="${buildDirectory}"
configInfo="${configs}"
baseLocation="${baseLocation}"
outputUpdateJars="${outputUpdateJars}"
archivesFormat="${archivesFormat}"
product="${product}"
forceContextQualifier="${forceContextQualifier}"
generateJnlp="${generateJnlp}"
signJars="${signJars}"
generateFeatureVersionSuffix="${generateFeatureVersionSuffix}"
significantVersionDigits="${significantVersionDigits}"
generatedVersionLength="${generatedVersionLength}"
generateVersionsLists="${generateVersionsLists}"
generateSourceReferences="${generateSourceReferences}"
groupConfiguration="${groupConfigurations}"
pluginPath="${transformedRepoLocation}${path.separator}${pluginPath}"
filteredDependencyCheck="${filteredDependencyCheck}"
platformProperties="${platformProperties}"
filterP2Base="${filterP2Base}"
flattenDependencies="${flattenDependencies}"
parallelCompilation="${parallelCompilation}"
parallelThreadCount="${parallelThreadCount}"
parallelThreadsPerProcessor="${parallelThreadsPerProcessor}"
customEESources="${customEESources}"
contextRepository="${transformedRepoLocation},${p2.context.repos}"
sourceBundleMode="${sourceBundleMode}"
sourceBundleTemplateFeature="${sourceBundleTemplateFeature}"
sourceBundleFeatureId="${sourceBundleFeatureId}"
sourceBundleFeatureVersion="${sourceBundleFeatureVersion}"
/>
</target>
On searching for resolution one of the link reported, issue
would be due to ant not recognizing the java version [https://github.com/mit-cml/appinventor-sources/issues/861].
Doing an echo of ${javacSource} & ${javacTarget} in
<target name="generateScript" description="Generating build
scripts..." depends="init">, could find the value being
properly set to 1.8.
Apart from the above errors, also encounter the attached
org.eclipse.core.runtime.CoreException -
Any updates to get the above issues resolved, would be very much
helpful.
Thank You,
Kind Regards,
Rohit M Pujar, [attachment "coreRuntimeException.txt" deleted by
Sarika Sinha/India/IBM] _______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://urldefense.proofpoint.com/v2/url?u=https-3A__dev.eclipse.org_mailman_listinfo_eclipse-2Ddev&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=tjRIbqOr-g7xZRUXRR3_rfB-pMcLEmP47pYsccHdQQk&m=5C-lhtRBcScGtVJSANEXNt37c8468WAl7fXtHJ5TPWU&s=Fcdntm_P7ykdrQufn4pQFewMGW5PJO5P6URG7YSd-n4&e=
_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev