Classmod/Setup

From LoadingByte Wiki
Jump to navigation Jump to search

It is really easy to set up Classmod for your project. You only have to add a simple JAR (and one additional library) to your classpath like any other dependency.

Maven

If you build with maven, you only have to add one dependency to the pom.xml of your maven project:

  • Add the QuarterCode maven repository:
<repositories>
    ...

    <repository>
        <id>quartercode-repository</id>
        <name>QuarterCode Repository</name>
        <url>http://repo.quartercode.com/content/groups/public/</url>
    </repository>
</repositories>
  • Add the Classmod dependency (change VERSION to the version of Classmod you want to use):
<dependency>
    <groupId>com.quartercode</groupId>
    <artifactId>classmod</artifactId>
    <version>VERSION</version>
</dependency>

Of course, the Classmod JAR and the additional library must also be part of the classpath at runtime. If you do not already have a system in place for that, you might want to use the Maven Shade Plugin.

Other

Depending on your build environment, this process might be very different. It is important that the following two JARs are on the classpath both at compilation time and at runtime. That means that those JARs must somehow be packaged with your final application.

Eclipse

If you are using Eclipse (and not already using maven), you need to tell Eclipse it should add the two JARs to the classpath. You can do that by following this tutorial for all two JARs.