boot icon indicating copy to clipboard operation
boot copied to clipboard

Doesn't work on Windows 10 with Java 10

Open Nonius opened this issue 6 years ago • 7 comments

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).

Nonius avatar Apr 14 '18 20:04 Nonius

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.

sinistral avatar May 02 '18 15:05 sinistral

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.

EmergentBehavior avatar May 30 '18 21:05 EmergentBehavior

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.

tirkarthi avatar Jun 05 '18 12:06 tirkarthi

@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)

alexander-yakushev avatar Aug 18 '18 01:08 alexander-yakushev

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

sinistral avatar Aug 18 '18 14:08 sinistral

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

alexander-yakushev avatar Aug 18 '18 15:08 alexander-yakushev

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

alandipert avatar Sep 14 '18 08:09 alandipert