Closed kgonia closed 6 years ago
Thanks for this @KrzychuJedi
I've not had time to migrate the bot to Java 9 yet - there's already a bxbot-java9 branch that I planned on getting things working on - but it looks like you've done it for me. Thanks!
Does the bot run ok on Java 9 too?
We'll also need to update:
If all is well, we should look to getting a Java 9 compatible release out later this month.
I build project using java9 unintentionally but when I found problem I'd fix it ;)
After my changes bot run and works (on example config) but I discover that integration tests fails under java9.
bxbot-java9 branch was merged to master so I thought that bot is java9 ready.
So, my proposition is to close this pull request https://github.com/gazbert/bxbot/pull/79 without merge and I will make new one to bxbot-java9 branch. Java9 branch, as you wrote, need some updates and I'm not an expert in java9 ;)
Sounds like a plan. I've just rebased the Java9 branch and tweaked the Travis link.
I'll merge your new PR when you're ready.
We can get stuff sorted on this branch and merge back to master for a Java9 release later this month all being well.
I'd made pull request to java9 branch https://github.com/gazbert/bxbot/pull/82
Powermock issue #864 [1] is blocking with no estimate for completion. Apparently, there is a wonky workaround [2], but at this point, I recommend waiting for them to deal and keeping bxbot's support at 1.8 for now.
Once powermock fixes their issue, this is where, in the bxbot to update the dependencies: bxbot-parent/build.gradle powermock_junit: dependencies.create("org.powermock:powermock-module-junit4:2.0.0-beta.5"), powermock_api_easymock: dependencies.create("org.powermock:powermock-api-easymock:2.0.0-beta.5"),
References: [1] Powermock issue #864 powermock/powermock#864
[2] Quoting Workaround: This could be hotfixed by passing --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED
[3] Duplicate issue gazbert/bxbot/issues/87
Changed branch to bxbot-java10 - JDK 10 superseded JDK 9 on 20 March 2018.
Migration path from JDK 8 -> JDK 10: https://docs.oracle.com/javase/10/migrate/toc.htm#JSMIG-GUID-7744EF96-5899-4FB2-B34E-86D49B2E89B6
Waiting on Travis JDK 10 support: https://github.com/travis-ci/travis-ci/issues/9368
TODO:
One warning on startup:
hostname:~/dev/IdeaProjects/bxbot/target/bxbot-parent-0.10.0-SNAPSHOT$ tail -f WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (jar:file:/Users/glynch/dev/IdeaProjects/bxbot/target/bxbot-parent-0.10.0-SNAPSHOT/libs/bxbot-app-0.10.0-SNAPSHOT.jar!/BOOT-INF/lib/spring-core-5.0.6.RELEASE.jar!/) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1 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 ./logs/bxbot.log
See: https://github.com/dsyer/spring-boot-java-10#create-a-spring-boot-application
You can switch this warning off by adding --illegal-access=deny to the command line.
Looks like fix coming in Boot 2.1.0 ...
Spring Framework ticket - https://jira.spring.io/browse/SPR-15859
Released.
Project fails co run under java9. I found out that it's connect to java9 following changes:
http://mail.openjdk.java.net/pipermail/jdk9-dev/2016-May/004309.html
One of the solutions is adding --add-modules option but it's not recommended and make building project more annoyoing.
https://docs.oracle.com/javase/9/migrate/#GUID-F640FA9D-FB66-4D85-AD2B-D931174C09A3
My proposal is add dependencies to maven/gradle. I already make pull request. https://github.com/gazbert/bxbot/pull/79 It works for java8&9