Class accessibility problems when launching MC1.17.x and MC1.18.x

Open
#7 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java
Domain
tooling

Research direction

Reproduce the failure with the FG7 example in build.gradle by running runClient and runServer for Minecraft 1.17.1. Start with net.minecraftforge.launcher.Main at the lookup shown in Main.java:123, then inspect how BootstrapLauncher is resolved with the module-path arguments. Done means both launch tasks find the main class without the accessibility exception.

Written by the indexing model from the issue text.

Description

On a clean project as per https://github.com/MinecraftForge/MDKExamples/blob/master/obfuscation/fg7/build.gradle

When attempting to runClient/runServer (both) a project for MC 1.17.1 Forge 37.1.1 using java 16 start will always fail because of accessibility issues with cpw.mods.bootstraplauncher.BootstrapLauncher. Example output:

> Task :runServer FAILED
Slime Launcher 0.1.8
Checking assets
Looking for main class: cpw.mods.bootstraplauncher.BootstrapLauncher
4 actionable tasks: 3 executed, 1 up-to-date
Configuration cache entry stored.
Exception in thread "main" java.lang.IllegalStateException: Could not find main class!
	at net.minecraftforge.launcher.Main.run(Main.java:125)
	at net.minecraftforge.launcher.Main.main(Main.java:34)
Caused by: java.lang.IllegalAccessException: symbolic reference class is not accessible: class cpw.mods.bootstraplauncher.BootstrapLauncher, from public Lookup
	at java.base/java.lang.invoke.MemberName.makeAccessException(MemberName.java:957)
	at java.base/java.lang.invoke.MethodHandles$Lookup.checkSymbolicClass(MethodHandles.java:3675)
	at java.base/java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:3647)
	at java.base/java.lang.invoke.MethodHandles$Lookup.findStatic(MethodHandles.java:2595)
	at net.minecraftforge.launcher.Main.run(Main.java:123)
	... 1 more
Something went wrong! Here is some debug info.
Args: [--main, cpw.mods.bootstraplauncher.BootstrapLauncher, --cache, E:\Programming\.environment\.gradle\caches\minecraftforge\forgegradle\slime-launcher\cache\net\minecraftforge\forge\1.17.1-37.1.1, --metadata, E:\Programming\Local\Java\forge-FG7-test\.gradle\mavenizer\repo\net\minecraftforge\forge\1.17.1-37.1.1\forge-1.17.1-37.1.1-metadata.zip, --, --launchTarget, forgeserveruserdev, --gameDir, ., --fml.forgeVersion, 37.1.1, --fml.mcVersion, 1.17.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210706.113038, --nogui]
JVM Args: [-p, E:\Programming\.environment\.gradle\caches\modules-2\files-2.1\cpw.mods\bootstraplauncher\0.1.17\899fb8e3912bb7d14a6f9611de117f77db710ec3\bootstraplauncher-0.1.17.jar;E:\Programming\.environment\.gradle\caches\modules-2\files-2.1\cpw.mods\securejarhandler\0.9.54\24b670f2c026ec9777e64a2c2126ebc8635dbe8d\securejarhandler-0.9.54.jar;E:\Programming\.environment\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-commons\9.1\8b971b182eb5cf100b9e8d4119152d83e00e0fdd\asm-commons-9.1.jar;E:\Programming\.environment\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-util\9.1\36464a45d871779f3383a8a9aba2b26562a86729\asm-util-9.1.jar;E:\Programming\.environment\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-analysis\9.1\4f61b83b81d8b659958f4bcc48907e93ecea55a0\asm-analysis-9.1.jar;E:\Programming\.environment\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm-tree\9.1\c333f2a855069cb8eb17a40a3eb8b1b67755d0eb\asm-tree-9.1.jar;E:\Programming\.environment\.gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\9.1\a99500cf6eea30535eeac6be73899d048f8d12a8\asm-9.1.jar, --add-modules, ALL-MODULE-PATH, --add-opens, java.base/java.util.jar=cpw.mods.securejarhandler, --add-exports, java.base/sun.security.util=cpw.mods.securejarhandler, --add-exports, jdk.naming.dns/com.sun.jndi.dns=java.naming]
Environment:
	MOD_CLASSES: E:\Programming\Local\Java\forge-FG7-test\build\sourceSets\main;E:\Programming\Local\Java\forge-FG7-test\build\sourceSets\main
	MCP_MAPPINGS: official_1.17.1
System:
	legacyClassPath.file: E:\Programming\Local\Java\forge-FG7-test\build\minecraftforge\forgegradle\slime-launcher\cache\net\minecraftforge\forge\1.17.1-37.1.1\minecraft_classpath.txt
	ignoreList: bootstraplauncher,securejarhandler,asm-commons,asm-util,asm-analysis,asm-tree,asm,client-extra,fmlcore,javafmllanguage,mclanguage,forge-
	eventbus.api.strictRuntimeChecks: true
	mergeModules: jna-5.8.0.jar,jna-platform-58.0.jar,java-objc-bridge-1.0.0.jar
	forge.enabledGameTestNamespaces: examplemod
Options: SlimeLauncherOptionsImpl{name=server, mainClass=cpw.mods.bootstraplauncher.BootstrapLauncher, args=[--launchTarget, forgeserveruserdev, --gameDir, ., --fml.forgeVersion, 37.1.1, --fml.mcVersion, 1.17.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210706.113038, --nogui], jvmArgs=[-p, {modules}, --add-modules, ALL-MODULE-PATH, --add-opens, java.base/java.util.jar=cpw.mods.securejarhandler, --add-exports, java.base/sun.security.util=cpw.mods.securejarhandler, --add-exports, jdk.naming.dns/com.sun.jndi.dns=java.naming], classpath=[], minHeapSize=null, maxHeapSize=null, systemProperties={legacyClassPath.file={minecraft_classpath_file}, ignoreList=bootstraplauncher,securejarhandler,asm-commons,asm-util,asm-analysis,asm-tree,asm,client-extra,fmlcore,javafmllanguage,mclanguage,forge-, mergeModules=jna-5.8.0.jar,jna-platform-58.0.jar,java-objc-bridge-1.0.0.jar, eventbus.api.strictRuntimeChecks=true, forge.enabledGameTestNamespaces=examplemod}, environment={MOD_CLASSES={source_roots}, MCP_MAPPINGS={mcp_mappings}}, workingDir=E:\Programming\Local\Java\forge-FG7-test\run, client=false}

Dominant language
Java
Stars
0
Forks
4
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MinecraftForge/SlimeLauncher

All issues in MinecraftForge/SlimeLauncher

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.