You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In forge execution task, classes inside the common-jar and forge platform-sided classes are loaded with setting the classpath in the argument.
When using non-java language(which also supports JVM) on forge platform-sided part, the built class files are not located on the forge/build/java/ and this causes the ClassNotFoundError when using those classes from Java source code or exceptions which related mod not loaded on set the entrypoint of the mod to those classes using like Kotlin For Forge.
To fix this problem (only to use Kotlin) temporary, you can add
this code into your gradle file(this code is for Kotlin DSL and you can use similar method in groovy code too.)
Using other languages in common part doesn't felt in this bug because it loads the dev.jar file which those classes are included. But if you @ExpectPlatform annotation, this bug will affect.
Also, using fully built jar file with external forge environment(official forge installation; multimc; etc.) will not affect to this bug because the problem is related to classpath, not remapping or creation of jar file.
I suggest to load devlibs in forge too or detect the languages(with finding the subdirectories of forge/build) and add classpath for them.
The text was updated successfully, but these errors were encountered:
In forge execution task, classes inside the common-jar and forge platform-sided classes are loaded with setting the classpath in the argument.
When using non-java language(which also supports JVM) on forge platform-sided part, the built class files are not located on the
forge/build/java/
and this causes theClassNotFoundError
when using those classes from Java source code or exceptions which related mod not loaded on set the entrypoint of the mod to those classes using likeKotlin For Forge
.To fix this problem (only to use Kotlin) temporary, you can add
this code into your gradle file(this code is for Kotlin DSL and you can use similar method in groovy code too.)
Using other languages in common part doesn't felt in this bug because it loads the
dev.jar
file which those classes are included. But if you@ExpectPlatform
annotation, this bug will affect.Also, using fully built jar file with external forge environment(official forge installation; multimc; etc.) will not affect to this bug because the problem is related to classpath, not remapping or creation of jar file.
I suggest to load devlibs in forge too or detect the languages(with finding the subdirectories of
forge/build
) and add classpath for them.The text was updated successfully, but these errors were encountered: