Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Can't start gitblit in windows --- java.lang.NoClassDefFoundError: org/kohsuke/args4j/CmdLineException #1294
But this is failing with below error.
java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
I have java 10 installed on my windows desktop. I have set the path and classpath variable in environment variables.
I'm not sure where you got the gitblit-1.8.0.jar file, but that jar is just part of a whole distribution package, like GitblitGO, to be used together. Information about the Gitblit GO package is here at the gitblit.com site.
Even when you get GitblitGO and set it up correctly as per instruction, gitblit only supports Java 7 and 8 runtimes. For Java 9+, you'll get exceptions similar to the above.
A workaround to make it run with Java 9+ is to modify the gitblit.cmd file and change it from:
and then start up the Gitblit server by executing the modified gitblit.cmd file.