when execute authority.cmd ,error occured

96 views
Skip to first unread message

shuihua he

unread,
Aug 1, 2018, 6:19:31 AM8/1/18
to gitblit
Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.
loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClass
Loader
        at com.gitblit.authority.Launcher.addJarFile(Launcher.java:155)
        at com.gitblit.authority.Launcher.main(Launcher.java:67)
QQ截图20180801181659.png

lhochet....@gmail.com

unread,
Aug 2, 2018, 3:58:17 AM8/2/18
to gitblit
Hello shuihua he,
Ensure that you're running with Java 8.
This message suggests that it is manipulating (adding jars to) the system class loader, which on Java 9+ is no longer a URLClassLoader (so the trick no longer works).

shuihua he

unread,
Aug 10, 2018, 9:12:58 AM8/10/18
to git...@googlegroups.com
so what to do?

--
You received this message because you are subscribed to the Google Groups "gitblit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gitblit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Florian Zschocke

unread,
Nov 8, 2019, 7:26:19 PM11/8/19
to gitblit
Run with Java 8.
Java 9 an higher is only supported from Version 1.9.0.

Alternatively, if you need to stick with your Java version, you can run it like this:

java -cp gitblit.jar:“%CD%\ext\*“ com.gitblit.authority.GitblitAuthority --baseFolder data

That is for Windows, as I am guessing you are using Windows.
Reply all
Reply to author
Forward
0 new messages