Processing 2.1 fails to compile all of its projects using JDK8 EA b119 error: The type java.util.Map$Entry cannot be resolved.
Xerxes Rånby
xerxes at zafena.se
Mon Dec 16 06:57:03 PST 2013
This have been fixed in eclipse ecj upstrem.
Updating java/mode/ecj.jar inside Processing 2.1
to eclipse ecj version 4.3.1
http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.3.1-201309111000/ecj-4.3.1.jar
fixes this issue.
Cheers
Xerxes
2013-12-16 14:42, Xerxes Rånby skrev:
> Processing internally used the Eclipse ecj compiler:
> The following code and command can reproduce the issue in combination with JDK 8 b119:
>
> $ cat HelloWorld.java
> import java.util.HashMap;
>
> public class HelloWorld {
> public static void main(String[] args) {
> System.out.println("Hello World!");
> }
> }
>
> #download the eclipse ecj version used internally by processing.
> wget https://github.com/processing/processing/raw/master/java/mode/ecj.jar
>
> tar zxvf jdk-8-ea-bin-b119-linux-i586-05_dec_2013.tar.gz
>
> ./jdk1.8.0/bin/java -jar ecj.jar -source 1.6 -classpath . -nowarn HelloWorld.java
> Annotation processing got disabled, since it requires a 1.6 compliant JVM
> ----------
> 1. ERROR in HelloWorld.java (at line 1)
> import java.util.HashMap;
> ^
> The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
> ----------
> 1 problem (1 error)
>
>
>
> # The compilation succeed if ecj.jar is invoked without the -source 1.6 argument:
> ./jdk1.8.0/bin/java -jar ecj.jar -classpath . -nowarn HelloWorld.java
> ./jdk1.8.0/bin/java HelloWorld
> Hello World!
>
>
> https://bugs.openjdk.java.net/browse/JDK-8024935 - compilation succeeds in java7 but fails in java8
> I do not have any account at bugs.openjdk.java.net that I can use to update this bug,
> feel free to attach the information above to the bug.
>
> Cheers
> Xerxes
>
> 2013-12-13 17:07, Balchandra Vaidya skrev:
>> [cc'd compiler-dev at openjdk.java.net]
>>
>>
>> On 12/13/13 12:00 PM, Balchandra Vaidya wrote:
>>>
>>> Hi Xerxes,
>>>
>>> Thank you for your feedback. I have updated the bug
>>> https://bugs.openjdk.java.net/browse/JDK-8024935 with
>>> your instruction to reproduce the issue below.
>>>
>>>
>>> Thanks,
>>> Balchandra
>>>
>>>
>>> On 12/13/13 11:20 AM, Xerxes Rånby wrote:
>>>> Processing 2.1 fails to compile all of its projects using JDK8 EA b119
>>>> error: The type java.util.Map$Entry cannot be resolved.
>>>>
>>>> This issue is a reproducer/reduced test case for:
>>>> https://bugs.openjdk.java.net/browse/JDK-8024935 - compilation succeeds in java7 but fails in java8
>>>>
>>>> I do not have any account at bugs.openjdk.java.net that I can use to update this bug,
>>>> feel free to attach the information below to the bug.
>>>>
>>>> steps to reproduce:
>>>>
>>>> #Download processing 2.1 from:
>>>> https://processing.org/download/
>>>>
>>>> tar zxvf processing-2.1-linux32.tgz
>>>> cd processing-2.1
>>>> #replace the bundled jdk inside processing with JDK8 EA b119
>>>> mv java java-bundled
>>>> mv jdk1.8.0 java
>>>> #run
>>>> ./processing
>>>>
>>>> Press
>>>> Sketch->Run
>>>> without entering any code fails with the following output:
>>>>
>>>> Annotation processing got disabled, since it requires a 1.6 compliant JVM
>>>> /tmp/sketch_131213a3040094527895471164temp/sketch_131213a.java:1: error: The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
>>>> import processing.core.*;
>>>> ^
>>>> 1 problem (1 error)
>>>
>>
>
More information about the compiler-dev
mailing list