[MCPE-1052] Minecraft Raspberry PI API is compiled for Java 7 only Created: 26/Dec/12  Updated: 04/May/17  Resolved: 11/Feb/13

Status: Resolved
Project: Minecraft (Bedrock codebase)
Component/s: None
Affects Version/s: 0.6.0
Fix Version/s: None

Type: Bug
Reporter: Zhuowei Zhang
Resolution: Invalid Votes: 1
Labels: None

Confirmation Status: Plausible
Platform: Tablet - Android - Other (Specify in description)
CHK:

 Description   

I know this is the wrong section, but this is the best place I could think of.

In the leaked prerelease for Minecraft Raspberry Pi edition, the two jars for Java api are compiled with Java 7, and running on OpenJDK 6 results in:

$ java -cp McPiDemos.jar pi.demo.LoopDemo
Exception in thread "main" java.lang.UnsupportedClassVersionError: pi/demo/LoopDemo : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: pi.demo.LoopDemo. Program will exit.

Trying to compile the source with Java 6 results in the following error:

$ javac -cp .:../src-api/ -d ../bindemo pi/demo/LoopDemo.java
../src-api/pi/EventFactory.java:16: illegal start of type
List<BlockHitEvent> events = new ArrayList<>();
^
../src-api/pi/Connection.java:84: cannot find symbol
symbol : method close(java.io.BufferedReader,java.io.BufferedWriter,java.net.Socket)
location: class pi.Connection
close(in, out, socket);
^
2 errors

Since some people are still running Java 6, it would make sense to build the Java API for Java 6.



 Comments   
Comment by Zhuowei Zhang [ 12/Feb/13 ]

Ah, well, it is fixed in the latest release anyways.

Comment by Do [ 11/Feb/13 ]

Unfortunately Pi Edition issues aren't being tracked here for now, sorry.

Generated at Sat Jan 11 14:12:12 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.