Jump to content

Recommended Posts

Posted

Hello everyone.

*Full disclosure, I am a noob @ Gradle & brute-forced my way through this :(

 

I am working on a mod that requires Java 1.8 (Nashorn JS Engine) - and had trouble getting MC Forge to compile and run for me.  It seems that Forge's version of objectweb's bytecode manipulation library has issues with Java 1.8.  Objectweb's latest version fixes the issues & you can use their latest library by adding the following code to your mod's build.gradle:

  Quote

configurations.all {

    resolutionStrategy.eachDependency { DependencyResolveDetails details ->

        if (details.requested.group == 'org.ow2.asm' && details.requested.name == 'asm-debug-all' && details.requested.version == '4.1') {

            //prefer different version which contains some necessary fixes

            details.useVersion '5.0.1'

        }

    }

}

 

Before adding this, I got build errors like:

 

  Reveal hidden contents

 

and

 

  Reveal hidden contents

 

 

I also got runtime errors after IntelliJ builds about class load errors (seemingly also related to the objectweb bytecode manipulation libs) but I couldn't reproduce the logs after fixing the issue (I still don't understand Gradle caching :()

 

Hope this helps those working with Java 8.

Posted

I gave up trying to use java 8. Everything was fine for me except for that :deobf task failing and that you cannot make the mod work on a 1.6 or 1.7 JVM. That leaves out a whole lot of mod users.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.