Skip to content

How to use for own game? #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ajh123 opened this issue Apr 8, 2022 · 2 comments
Closed

How to use for own game? #109

ajh123 opened this issue Apr 8, 2022 · 2 comments

Comments

@ajh123
Copy link

ajh123 commented Apr 8, 2022

So I've got modlauncher working in my gradle, but I can't seem to start modlauncher properly.

Exception in thread "main" java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class cpw.mods.cl.ModuleClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader is in module java.base of loader 'bootstrap'; cpw.mods.cl.ModuleClassLoader is in unnamed module of loader 'app')
	at cpw.mods.modlauncher.ModuleLayerHandler.<init>(ModuleLayerHandler.java:52)
	at cpw.mods.modlauncher.Launcher.<init>(Launcher.java:52)
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
	at net.ddns.minersonline.HistorySurvival.Game.start(Game.java:60)
	at net.ddns.minersonline.HistorySurvival.Game.main(Game.java:328)

Here's my game's start method which is called by the main method

    private void start(String[] args) throws IOException, ClassNotFoundException {
        Launcher.main(args); //This is Game.java:60
        ...
    }
@ajh123
Copy link
Author

ajh123 commented Apr 8, 2022

This is my full code if anyone needs it

@TheCurle
Copy link
Member

TheCurle commented Apr 8, 2022

This issue tracker is not tech support, neither are we going to teach you basic Java, which is the stem issue of this.

@TheCurle TheCurle closed this as completed Apr 8, 2022
@McModLauncher McModLauncher locked as off-topic and limited conversation to collaborators Apr 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants