Jump to content

Libraries/Dependencies in META-INF not being accessed after build


Recommended Posts

Posted

I've been trying to add some external libraries to my project and everything works fine inside the IDE when I runClient, but when I build the jar and run it I get classNotDefFoundError which obviously means that the jars are not being accessed from the META-INF but im not sure how to fix that...

 

configurations {
    inJar
}
configurations.compile.extendsFrom(configurations.inJar)

dependencies {
    inJar("net.dv8tion:JDA:4.3.0_339")
    inJar("com.github.HypixelDev.PublicAPI:Java:2.0.0")
}

jar {
    from(configurations.inJar) {
        into('META-INF/libraries')
    }
}

this is currently how I am importing the libraries, and they do show inside the jar when I decompile it, but im still not sure how to access them.

Posted
8 hours ago, sciwhiz12 said:

What version of Minecraft and Forge is this for?

I know it’s not supported, but I am developing a 1.8 client mod and have a pretty good hang on things except for getting these dependencies to load outside of my IDE.

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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