Fabric API

Fabric API

112M Downloads

Entrypoint class cannot be found when using the package starting with `java.`

BenDol opened this issue ยท 3 comments

commented

I am having an issue with java.lang.ClassNotFoundException: java.bonfyre.fantasyrpg.Frpg Entrypoint class cannot be found when using the package java.bonfyre.fantasyrpg as soon as I remove the .java and regenerate the project it works. No idea why.

Reproduce

Generate a project like so from https://fabricmc.net/develop/template/

Mod Name: frpg
Package Name: java.bonfyre.fantasyrpg
[x] Split client and common sources

image

commented

The JVM will prevent you from using any package starting with java. - the limitation in Loader is based on a similar one in ClassLoader

commented

I would not put your code in the java. package as this its expected to only contain code from Java. We have a number of optimistations such as here.

commented

@BenDol
Sidenote: Mod IDs should not be abbreviations, as they are meant to be unique. Short is not good for uniqueness.
Abbreviated mod IDs are also much harder to match to the actual mod when they show up in logs and crashes.