boot-clj / boot

Build tooling for Clojure.
https://boot-clj.github.io/
Eclipse Public License 1.0
1.75k stars 181 forks source link

Doesn't work on Windows 10 with Java 10 #691

Open Nonius opened 6 years ago

Nonius commented 6 years ago

Problem Description

I tried to install boot (via the boot.exe from the github page) on Windows 10 with Java 10 and I get an error message that it requires Java 1.7.0

Steps to reproduce

Make sure that on your Windows 10 only Java 10 is installed, download the boot.exe from the github page, and try to run it.

Platform details

Platform: Windows Platform version: 10 Pro JRE/JDK version (java -version): java version "10" 2018-03-20 Java(TM) SE Runtime Environment 18.3 (build 10+46) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)

Boot details

Boot version (2.7.2): build.boot present? (no): ~/.boot/profile present? (no): Task name? (if applicable): -h PS C:> boot -h This application requires a Java Runtime Environment 1.7.0

Please also provide the contents of build.boot and ~/.boot/profile (if applicable).

sinistral commented 6 years ago

On macOS, I'm seeing an outright failure with Java 10.

>> boot -h
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)

>> java -version                                                                                                                 
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

Boot works fine with Java 8. I'd be happy to open another issue if not turning this into a general Java 10 thread is preferred.

EmergentBehavior commented 6 years ago

On Fedora Linux 28 I can run the latest non-snapshot Boot completely fine in Java 10. I only get a reflection warning (that I believe is resolved by a dynapath upgrade in the latest Boot snapshot):

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by dynapath.defaults$fn__1516$fn__1517 (file:/home/<myuser>/.m2/repository/boot/pod/2.7.2/pod-2.7.2.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of dynapath.defaults$fn__1516$fn__1517
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java -version                                                
openjdk version "10.0.1" 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10)
OpenJDK 64-Bit Server VM (build 10.0.1+10, mixed mode)

EDIT: @sinistral Based on your exception and my reflection warning, it looks like the issues are related (or even the same) except that instead of a warning you get an error.

I'm wondering if it's the same issue in Windows. @Nonius @sinistral might be worth trying the latest Boot snapshot and seeing if you still get this error with Java 10.

tirkarthi commented 6 years ago

It will be good to add JDK 10 to Appveyor CI. I have added JDK 9 and 10 to Travis as part of #696 and could see no failures on Linux builds except for JDK 11.

alexander-yakushev commented 6 years ago

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

sinistral commented 6 years ago

That worked for me @alexander-yakushev, thanks! I didn't think of repulling the bootstrap script ):

alexander-yakushev commented 6 years ago

Neither did I at first:) Then I saw this suggestion somewhere else.

alandipert commented 6 years ago

@Nonius are you seeing this with the latest boot.sh?