/FMLJ9

Forge Mod Loader Package for Java 9

Primary LanguageJava

Forge Mod Loader Java 9 Interop

A mouthful, isn't it? That's why I called it "Shifty". This project brings bleeding edge java 9 to the minecraft modding masses.

UPDATE: TODO/OTHER

  • Make it easier for the plebian. Like, I made assumptions that people might not realize when I wrote the instructions: When you compile ShiftyClassLoader.java, java itself WILL look for it in the mod directory but under its package within that directory. Unless FML does something screwy to the DEFAULT java behavior... IE. /com/sh1ftchg/java9/ShiftyClassLoader<and its anonymous/named inners>.class
  • Discovered that @LexManos is an anti-intellectualist? Who knew?

Instructions

Checkout the repo if you want... But really, all you need is ShiftyClassLoader.java.

  • Compile ShiftyClassLoader.java, use javac, or gcj, or whatever you like. Note: To compile this you need objectweb 2's (ow2) ASM added to JAVAC's classpath, it is included/required by forge figure out where it has been saved by your loader. We're not here to add more dependencies.
  • Add the ".class" file's location to the java classpath. Alternatively, drop them in the game directory for the mod you want to run on Java 9.
  • Add "-Djava.system.class.loader=com.sh1ftchg.java9.ShiftyClassLoader" without the quotes to your runtime arguments.
  • Add "--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED" to the java virtual machine's arguments.
    • The add opens option is java 9 specific. It opens the jdk.internal.reflect (formerly sun.reflect) package to the mod-loader for use.

Just another screenshot