Jump to content
  • 0

Technic Launcher Non-functional under JDK >11


Question

Posted

Due to the launcher's reliance on the com.sun.awt.AWTUtilities which has been removed in Java 11, it does not function with newer versions of Java. While this is fine for most users under Windows, it can be problematic for users under Linux as some distros do not offer older JREs as a package, forcing the user to compile the JDK from source to run the launcher. In modern versions of Java, all of the aforementioned class's functionality is provided by other APIs, so it would make sense to migrate. See the Oracle and OpenJDK bugs for more details.

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8200149

https://bugs.openjdk.java.net/browse/JDK-8200149

PS C:\Users\User> java -version
java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
[B#407] 2019/06/01 10:57:54 [INFO] Launching command: 'C:\Program Files\Java\jdk-12.0.1\bin\javaw.exe -Xmx256m -verbose -Djava.net.preferIPv4Stack=true -Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true -cp /C:/Users/User/Downloads/TechnicLauncher.jar net.technicpack.launcher.LauncherMain '
[B#407] 2019/06/01 10:57:56 [INFO] Console Mode Activated
[B#407] 2019/06/01 10:57:56 [SEVERE] java.lang.NoClassDefFoundError: com/sun/awt/AWTUtilities
[B#407] 2019/06/01 10:57:56 [SEVERE] 	at net.technicpack.ui.controls.installation.SplashScreen.<init>(SplashScreen.java:84)
[B#407] 2019/06/01 10:57:56 [SEVERE] 	at net.technicpack.launcher.autoupdate.TechnicRelauncher.buildUpdaterTasks(TechnicRelauncher.java:108)
[B#407] 2019/06/01 10:57:56 [SEVERE] 	at net.technicpack.autoupdate.Relauncher.runAutoUpdater(Relauncher.java:97)
[B#407] 2019/06/01 10:57:56 [SEVERE] 	at net.technicpack.launcher.LauncherMain.main(LauncherMain.java:198)
[B#407] 2019/06/01 10:57:56 [SEVERE] Caused by: java.lang.ClassNotFoundException: com.sun.awt.AWTUtilities
[B#407] 2019/06/01 10:57:56 [SEVERE] 	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
[B#407] 2019/06/01 10:57:56 [SEVERE] 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
[B#407] 2019/06/01 10:57:56 [SEVERE] 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
[B#407] 2019/06/01 10:57:56 [SEVERE] 	... 4 more
[B#407] 2019/06/01 10:57:56 [SEVERE] Unhandled Exception in Thread[main,5,main]
java.lang.NoClassDefFoundError: com/sun/awt/AWTUtilities
	at net.technicpack.ui.controls.installation.SplashScreen.<init>(SplashScreen.java:84)
	at net.technicpack.launcher.autoupdate.TechnicRelauncher.buildUpdaterTasks(TechnicRelauncher.java:108)
	at net.technicpack.autoupdate.Relauncher.runAutoUpdater(Relauncher.java:97)
	at net.technicpack.launcher.LauncherMain.main(LauncherMain.java:198)
Caused by: java.lang.ClassNotFoundException: com.sun.awt.AWTUtilities
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 4 more

 

2 answers to this question

Recommended Posts

  • 0
Posted
1 hour ago, JavaBad said:

Due to the launcher's reliance on the com.sun.awt.AWTUtilities which has been removed in Java 11, it does not function with newer versions of Java. While this is fine for most users under Windows, it can be problematic for users under Linux as some distros do not offer older JREs as a package, forcing the user to compile the JDK from source to run the launcher. In modern versions of Java, all of the aforementioned class's functionality is provided by other APIs, so it would make sense to migrate. See the Oracle and OpenJDK bugs for more details.

https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8200149

https://bugs.openjdk.java.net/browse/JDK-8200149

 

Fixing this now wouldn't help you in any way, as Forge only starts supporting Java >8 starting at Forge for MC 1.13.

  • 0
Posted

I reported this bug too on May 31th -> https://forums.technicpack.net/topic/323203-technic-launcher-wont-open-after-installation/

Even if you downgrade to some compatible Java make sure to delete all other incompatible Java installations from your computer. For me the problem wasn't fixed with only installing Java 8 and changing my environment variables accordingly. Technic Launcher kinda still tried to use some other Java than I wanted it to use. Completely deleting those incompatible Java versions fixed the problem for me.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...