I’m currently experimenting with the JavaFX SmartDashboard that comes as a default in the C:/Users/USERNAME/wpilib/tools directory. However, both opening the Driver Station and double-clicking the .jar do not open the SmartDashboard.
I have both the JDK 11 and JDK 1.8.0_181 installed in my Java directory in Program Files, but javaw.exe from JDK 1.8.0 is set as the default to run .jar files (as I heard that only Java 8 works on SmartDashboard). I also have JAVA_HOME set to JDK 1.8.0, in case that’s what determines running the .jar files. The only file in the tools directory that seems to open through JDK 1.8.0 is the RobotBuilder.
I opened a cmd and found this error while trying to run the SmartDashboard.
Exception in thread “main” java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader ‘bootstrap’)
at edu.wpi.first.smartdashboard.extensions.FileSniffer.findExtensions(FileSniffer.java:36)
at edu.wpi.first.smartdashboard.SmartDashboard.main(SmartDashboard.java:72)
Please help.