Search code examples
javaeclipsedllrxtxminecraft-forge

How can I include the java rxtx library into my Minecraft mod?


How would you include the rxtx dlls in a minecraft forge mod I have no trouble whatsoever with the rxtxcomm.jar file but I cant include the root folder in the classpath (like normal) because then the game wont launch because of the duplicate mod (Im currently using eclipse)


Solution

  • In your build.gradle:

    dependencies {
        // create a directory called libs in the directory where the build.gradle is
        compile fileTree(dir: 'libs', include: '*.jar')
    }
    jar {
        // make in the directory where the build.gradle is a native folder
        // and put your dll's there.
        from('native') {
            into('org/sqlite/native')
            }
        }
     processResources
        {
        //... add this below what's already there under process resources.
        copy {
                from('/native')
                into('/org/sqlite/native')
            }
    }
    

    This combination of stuff works for me to add the sqlite jar and dll's to my who took my cookies jar.