Discussion:
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
2013-12-13 11:20:35 UTC
Permalink
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)
Balchandra Vaidya
2013-12-13 12:00:10 UTC
Permalink
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
Post by Xerxes RÃ¥nby
Processing 2.1 fails to compile all of its projects using JDK8 EA b119
error: The type java.util.Map$Entry cannot be resolved.
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.
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
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)
Balchandra Vaidya
2013-12-13 16:07:36 UTC
Permalink
Post by Balchandra Vaidya
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
Post by Xerxes RÃ¥nby
Processing 2.1 fails to compile all of its projects using JDK8 EA b119
error: The type java.util.Map$Entry cannot be resolved.
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.
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
Annotation processing got disabled, since it requires a 1.6 compliant JVM
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)
Xerxes Rånby
2013-12-16 13:42:18 UTC
Permalink
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
Post by Balchandra Vaidya
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
Post by Xerxes RÃ¥nby
Processing 2.1 fails to compile all of its projects using JDK8 EA b119
error: The type java.util.Map$Entry cannot be resolved.
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.
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
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)
Xerxes Rånby
2013-12-16 14:57:03 UTC
Permalink
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
Post by Xerxes RÃ¥nby
$ 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)
./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
Post by Balchandra Vaidya
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
Post by Xerxes RÃ¥nby
Processing 2.1 fails to compile all of its projects using JDK8 EA b119
error: The type java.util.Map$Entry cannot be resolved.
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.
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
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)
Loading...