Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-1052

Minecraft Raspberry PI API is compiled for Java 7 only

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 0.6.0
    • None
    • Plausible
    • Tablet - Android - Other (Specify in 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.

            zhuowei Zhuowei Zhang
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: