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.
If you build with maven, you only have to add one dependency to the
pom.xml of your maven project:
- Add the LoadingByte maven repository:
<repositories> ... <repository> <id>quartercode-repository</id> <name>QuarterCode Repository</name> <url>https://repo.loadingbyte.com/content/groups/maven-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.
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.
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.