Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install/first-run fails on Java 9 with ClassCastException #525

Closed
kirked opened this issue Nov 20, 2016 · 9 comments
Closed

Install/first-run fails on Java 9 with ClassCastException #525

kirked opened this issue Nov 20, 2016 · 9 comments

Comments

@kirked
Copy link

kirked commented Nov 20, 2016

I realise this is premature, but the release of Java 9 fast approaches...

I downloaded boot.sh on current Linux Mint, then ran this:

$ boot repl
Downloading https://github.com/boot-clj/boot/releases/download/2.6.0/boot.jar...
Exception in thread "main" java.lang.ClassCastException: jdk.internal.loader.ClassLoaders$AppClassLoader (in module: java.base) cannot be cast to java.net.URLClassLoader (in module: java.base)
	at Boot.loadJar(Boot.java:228)
	at Boot.main(Boot.java:254)
doug@twist ~/code/dashboard $ java -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
@tobias
Copy link
Contributor

tobias commented Nov 22, 2016

This is caused by the app classloader being replaced in Java 9 - see tobias/clojure-java-9#3

@tobias
Copy link
Contributor

tobias commented Dec 9, 2016

This should be fixed by #539 and boot-clj/boot-bin#4.

@ghadishayban
Copy link

I tested this with JDK 7, 8, & 9 and it worked properly.

@laseray
Copy link

laseray commented Jan 27, 2018

This is not fixed for me. Boot still fails to run under Java 9 (on Linux Mint 18.3) with latest snapshot. Gives the same Classloader error.

#http://boot-clj.com
#Fri Jan 26 15:26:16 EST 2018
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_COLOR=yes
BOOT_VERSION=2.8.0-SNAPSHOT
BOOT_CLOJURE_VERSION=1.9.0

java -version
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

@prakashksinha
Copy link

hive 2.3.1 on jdk 9 not working. any clue?

@alexander-yakushev
Copy link
Contributor

alexander-yakushev commented Aug 18, 2018

@laseray @prakashksinha Make sure you re-download the Boot binary file (boot.sh or boot.exe, see here https://github.com/boot-clj/boot#install)

@Bost
Copy link

Bost commented Dec 24, 2018

I've got the same problem under java 1.10:

$ java -version
openjdk version "10.0.2" 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)
$ boot -v
Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
	at Boot.loadJar(Boot.java:228)
	at Boot.main(Boot.java:254)

Edit: fixed by reinstalling according to https://github.com/boot-clj/boot#install

@alexander-yakushev
Copy link
Contributor

@Bost are you using the latest Boot binary?

@Bost
Copy link

Bost commented Dec 24, 2018

@alexander-yakushev That was the problem :) You may consider closing this issue. Thanx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants