How do I lower the Java version for a plugin?

Discussion in 'Plugin Development' started by EgyptianKing, Jul 9, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    EgyptianKing

    I'm not entirely sure what Java version I am compiling my Bukkit plugins in but I believe it is Java 7 or 8. I have JRE 8 installed on my computer. How can I compile my Bukkit plugins using Java 6 so that everyone will be able to use my plugins?

    Thanks
     
  2. Offline

    xTigerRebornx

    EgyptianKing Compile against a lower JDK?
    Java 7 would be fine for providing compatibility.
    Your IDE should let you compile against a lower version, if you are using one.
     
    EgyptianKing likes this.
  3. Offline

    RawCode

    hacky solution is just patching classfiles (you can get filespecs from google) but this may cause issues if plugin implement any feature not present in older JDK.

    this can be done with classloader proxy just fine.
     
  4. If you have eclipse:

    1. Go to your project properties. (Alt + Enter)
    2. Go to build path.

    [​IMG]

    3. Click on the JRE System Library and then click on Edit.

    [​IMG]

    4. Change the selected JRE and after that click Finish and close the properties window.

    [​IMG]

    5. Code!
     
Thread Status:
Not open for further replies.

Share This Page