Skip to content
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

Fix LoaderUtil saying there are duplicate classpath entries if there are in fact none. #979

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gamebuster19901
Copy link

@Gamebuster19901 Gamebuster19901 commented Sep 19, 2024

Also futureproofs the checks just in case the class names are changed.

I was encountering issues with org.objectweb.asm.Type being loaded by both the knot classloader, and the app class loader. I removed ASM entirely and was thoroughly confused that the error message stated that were duplicate ASM classes.

Related to #965

Previous output if no ASM is on the classpath:

Exception in thread "main" java.lang.ExceptionInInitializerError
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.IllegalStateException: duplicate ASM classes found on classpath: 
	at net.fabricmc.loader.impl.util.LoaderUtil.verifyClasspath(LoaderUtil.java:71)
	at net.fabricmc.loader.impl.launch.knot.Knot.<clinit>(Knot.java:345)
	... 1 more

New output if no ASM is on the classpath:

Exception in thread "main" java.lang.ExceptionInInitializerError
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.IllegalStateException: ASM not detected on the classpath (or perhaps org/objectweb/asm/ClassReader.class was renamed?)
	at net.fabricmc.loader.impl.util.LoaderUtil.verifyClasspath(LoaderUtil.java:89)
	at net.fabricmc.loader.impl.launch.knot.Knot.<clinit>(Knot.java:345)
	... 1 more

…are none.

Also futureproofs the checks just in case the class names are changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants