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

Support Oracle JDK9 EA #5520

Closed
gsmet opened this Issue Jan 27, 2016 · 17 comments

Comments

Projects
None yet
@gsmet

gsmet commented Jan 27, 2016

Hi,

I'm working on having a Travis based build for Hibernate Search and we are willing to test Search against JDK9 EA to provide feedback to the JDK team.

The JDK9 is installable through the apt addons and the oracle-java9-installer package but the JDK switcher does not support it atm:

$ jdk_switcher use oraclejdk9

Sorry, but JDK 'oraclejdk9' is not known.

The command "jdk_switcher use oraclejdk9" failed and exited with 1 during .

Would it be possible to support it soon?

Thanks.

Guillaume

@gildegoma

This comment has been minimized.

Show comment
Hide comment
@gildegoma

gildegoma Jan 27, 2016

Member

The jdk_switcher update and the JDK9 EA installation have already been prepared (see travis-ci/travis-cookbooks#587).

This is however not "production ready" at all (e.g. the jdk9 project is still in an "unstable" phase, the webupd8 apt package is not complete yet, etc). See also http://openjdk.java.net/projects/jdk9/ for the own OpenJDK9 schedule.

But the good news is that If you don't fear to play with an unstable environment, you can give a try with the upcoming platform, which already includes a preinstalled JDK "9-ea". You simply have to update your .travis.yml with the following settings:

sudo: required
dist: trusty
group: edge
jdk: oraclejdk9

and you get it 😺

@gsmet if you try this "alpha" environment, please be aware that the maven configuration on this system is broken with JDK9. There might be other integration troubles, and your feedbacks will be very welcome 😄

Member

gildegoma commented Jan 27, 2016

The jdk_switcher update and the JDK9 EA installation have already been prepared (see travis-ci/travis-cookbooks#587).

This is however not "production ready" at all (e.g. the jdk9 project is still in an "unstable" phase, the webupd8 apt package is not complete yet, etc). See also http://openjdk.java.net/projects/jdk9/ for the own OpenJDK9 schedule.

But the good news is that If you don't fear to play with an unstable environment, you can give a try with the upcoming platform, which already includes a preinstalled JDK "9-ea". You simply have to update your .travis.yml with the following settings:

sudo: required
dist: trusty
group: edge
jdk: oraclejdk9

and you get it 😺

@gsmet if you try this "alpha" environment, please be aware that the maven configuration on this system is broken with JDK9. There might be other integration troubles, and your feedbacks will be very welcome 😄

@gsmet

This comment has been minimized.

Show comment
Hide comment
@gsmet

gsmet Jan 28, 2016

@gildegoma

Thanks for your feedback. I spotted a typo here (probably harmless):
https://github.com/travis-ci/travis-cookbooks/pull/587/files#diff-6db6876955404b854c46e46975340a67R60
(java-8 should be java-9)

We indeed do use Maven. Is there a way to fix the Maven configuration by some magic?

My main issue with the Trusty infrastructure is that it looks like the cache is not supported for public repositories (https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments) and caching the .m2/repository really saves a lot of time and resources. Is it something subject to change?

Thanks!

gsmet commented Jan 28, 2016

@gildegoma

Thanks for your feedback. I spotted a typo here (probably harmless):
https://github.com/travis-ci/travis-cookbooks/pull/587/files#diff-6db6876955404b854c46e46975340a67R60
(java-8 should be java-9)

We indeed do use Maven. Is there a way to fix the Maven configuration by some magic?

My main issue with the Trusty infrastructure is that it looks like the cache is not supported for public repositories (https://docs.travis-ci.com/user/ci-environment/#Virtualization-environments) and caching the .m2/repository really saves a lot of time and resources. Is it something subject to change?

Thanks!

@gildegoma

This comment has been minimized.

Show comment
Hide comment
@gildegoma

gildegoma Jan 28, 2016

Member

@gsmet thanks for the good catch (now fixed)

We'll first validate JDK9-EA in Trusty environment, and I suppose that the Docker-based environment will only be updated when things get really stable. Not having file caching is of course a disadvantage, but it would be great if you try to already integrate on a distinct "testing" branch.

If you want to try JDK9-EA with Maven anyway, you have to take care of the following points:

Member

gildegoma commented Jan 28, 2016

@gsmet thanks for the good catch (now fixed)

We'll first validate JDK9-EA in Trusty environment, and I suppose that the Docker-based environment will only be updated when things get really stable. Not having file caching is of course a disadvantage, but it would be great if you try to already integrate on a distinct "testing" branch.

If you want to try JDK9-EA with Maven anyway, you have to take care of the following points:

@jaredsburrows

This comment has been minimized.

Show comment
Hide comment
@jaredsburrows

jaredsburrows May 1, 2016

Any update on this?

I get this error:

$ jdk_switcher use oraclejdk9
Sorry, but JDK 'oraclejdk9' is not known.
The command "jdk_switcher use oraclejdk9" failed and exited with 1 during .

When using:

language: java

jdk:
 - oraclejdk8
 - oraclejdk9

matrix:
  allow_failures:
    - jdk: oraclejdk9

jaredsburrows commented May 1, 2016

Any update on this?

I get this error:

$ jdk_switcher use oraclejdk9
Sorry, but JDK 'oraclejdk9' is not known.
The command "jdk_switcher use oraclejdk9" failed and exited with 1 during .

When using:

language: java

jdk:
 - oraclejdk8
 - oraclejdk9

matrix:
  allow_failures:
    - jdk: oraclejdk9
@jaredsburrows

This comment has been minimized.

Show comment
Hide comment
@jaredsburrows

jaredsburrows May 8, 2016

@gsmet Were you able to get jdk9 working?

jaredsburrows commented May 8, 2016

@gsmet Were you able to get jdk9 working?

@vlsi

This comment has been minimized.

Show comment
Hide comment
@vlsi

vlsi May 15, 2016

I was able to build maven project via jdk9-ea, however the VM takes forever to boot from time to time. For instance: https://travis-ci.org/pgjdbc/pgjdbc/builds/130389303
The vm just gets stuck in "booting" state.
Is it something expected for group: edge?

vlsi commented May 15, 2016

I was able to build maven project via jdk9-ea, however the VM takes forever to boot from time to time. For instance: https://travis-ci.org/pgjdbc/pgjdbc/builds/130389303
The vm just gets stuck in "booting" state.
Is it something expected for group: edge?

@vlsi

This comment has been minimized.

Show comment
Hide comment
@vlsi

vlsi Jun 14, 2016

Just in case, approach from #4178 (comment) worked for me to install jdk9-ea in Travis docker environment. The drawback is jdk column reads "jdk8", otherwise it works.

Being able to just use oraclejdk9 would be good.

vlsi commented Jun 14, 2016

Just in case, approach from #4178 (comment) worked for me to install jdk9-ea in Travis docker environment. The drawback is jdk column reads "jdk8", otherwise it works.

Being able to just use oraclejdk9 would be good.

@gildegoma

This comment has been minimized.

Show comment
Hide comment

@sbrannen sbrannen referenced this issue Jul 2, 2016

Closed

Test with JDK 9 Early Access builds #296

1 of 1 task complete

torstenwerner pushed a commit to torstenwerner/java-9-no-jar-hell that referenced this issue Aug 19, 2016

@omajid

This comment has been minimized.

Show comment
Hide comment
@omajid

omajid Sep 18, 2016

Are there any plans for supporting OpenJDK 9? I would be happy to contribute.

omajid commented Sep 18, 2016

Are there any plans for supporting OpenJDK 9? I would be happy to contribute.

@Horcrux7

This comment has been minimized.

Show comment
Hide comment
@Horcrux7

Horcrux7 Oct 25, 2016

Is there any progress on it? I receive: Sorry, but JDK 'oraclejdk9' is not known.

https://travis-ci.org/i-net-software/jlessc/jobs/170586003

Horcrux7 commented Oct 25, 2016

Is there any progress on it? I receive: Sorry, but JDK 'oraclejdk9' is not known.

https://travis-ci.org/i-net-software/jlessc/jobs/170586003

@Horcrux7

This comment has been minimized.

Show comment
Hide comment
@Horcrux7

Horcrux7 Oct 25, 2016

Ok, after setting of all 4 properties the JDK 9 was used. But it used Gradle 2.13 which does not support JDK 9. The minimum version would be 3.0 better is 3.1.

With JDK 7 and 8 there is a java.lang.NoClassDefFoundError: org/slf4j/spi/LoggerFactoryBinder
Seems a problem with the unstable environment.

Horcrux7 commented Oct 25, 2016

Ok, after setting of all 4 properties the JDK 9 was used. But it used Gradle 2.13 which does not support JDK 9. The minimum version would be 3.0 better is 3.1.

With JDK 7 and 8 there is a java.lang.NoClassDefFoundError: org/slf4j/spi/LoggerFactoryBinder
Seems a problem with the unstable environment.

alicederyn added a commit to inferred/FreeBuilder that referenced this issue Nov 21, 2016

Fix unreliable Travis builds
Attempting to enable Java 9 following the advice on
[issue 5520](travis-ci/travis-ci#5520 (comment))
has resulted in the JDK 8 link that JAVA_HOME points to being intermittently deleted.
Alternative advice on
[issue 5897](travis-ci/travis-ci#5897 (comment))
appears to be more reliable.

tofi86 added a commit to IDPF/epubcheck that referenced this issue Jun 6, 2017

@tofi86

This comment has been minimized.

Show comment
Hide comment
@tofi86

tofi86 Jun 6, 2017

JDK9 is about to be released in July 2017 and we'd like to test our maven project against Java 9.
However, we don't get it working with the solution mentioned above:

sudo: required
dist: precise
group: edge
jdk:
  - oraclejdk7
  - oraclejdk8
  - oraclejdk9
matrix:
  allow_failures:
    - jdk: oraclejdk9

only changed dist from trusty to precise since that's the default system on Travis in the meantime...

This results in https://travis-ci.org/IDPF/epubcheck/jobs/239966376

$ jdk_switcher use oraclejdk9
Sorry, but JDK 'oraclejdk9' is not known.
The command "jdk_switcher use oraclejdk9" failed and exited with 1 during .

Also maven doesn't try to pick up Java 9:

mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/local/maven
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre

What's the best solution currently to test a maven project with java 9?

tofi86 commented Jun 6, 2017

JDK9 is about to be released in July 2017 and we'd like to test our maven project against Java 9.
However, we don't get it working with the solution mentioned above:

sudo: required
dist: precise
group: edge
jdk:
  - oraclejdk7
  - oraclejdk8
  - oraclejdk9
matrix:
  allow_failures:
    - jdk: oraclejdk9

only changed dist from trusty to precise since that's the default system on Travis in the meantime...

This results in https://travis-ci.org/IDPF/epubcheck/jobs/239966376

$ jdk_switcher use oraclejdk9
Sorry, but JDK 'oraclejdk9' is not known.
The command "jdk_switcher use oraclejdk9" failed and exited with 1 during .

Also maven doesn't try to pick up Java 9:

mvn -version
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T17:29:23+00:00)
Maven home: /usr/local/maven
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre

What's the best solution currently to test a maven project with java 9?

@garydgregory

This comment has been minimized.

Show comment
Hide comment
@garydgregory

garydgregory Jun 6, 2017

garydgregory commented Jun 6, 2017

@tofi86

This comment has been minimized.

Show comment
Hide comment
@tofi86

tofi86 Jun 6, 2017

Thanks Gary, good to know!

Update to my question: it works when using dist: trusty, but it would be nice if precise is also supported.

tofi86 commented Jun 6, 2017

Thanks Gary, good to know!

Update to my question: it works when using dist: trusty, but it would be nice if precise is also supported.

@sormuras

This comment has been minimized.

Show comment
Hide comment
@sormuras

sormuras Jul 5, 2017

According to https://launchpad.net/~webupd8team/+archive/ubuntu/java?field.series_filter=trusty jdk-9+175 should be provided by trusty. But it is jdk-9+ea-174: https://travis-ci.org/junit-team/junit5/jobs/250251105#L421 -- which does not allow illegal access by default.

sormuras commented Jul 5, 2017

According to https://launchpad.net/~webupd8team/+archive/ubuntu/java?field.series_filter=trusty jdk-9+175 should be provided by trusty. But it is jdk-9+ea-174: https://travis-ci.org/junit-team/junit5/jobs/250251105#L421 -- which does not allow illegal access by default.

@the8472

This comment has been minimized.

Show comment
Hide comment
@the8472

the8472 Aug 6, 2017

The following currently does not work for me

sudo: required
dist: precise
group: edge
jdk: oraclejdk9

the log shows

$ jdk_switcher use oraclejdk9
Switching to Oracle JDK9 (java-9-oracle), JAVA_HOME will be set to /usr/lib/jvm/java-9-oracle
update-java-alternatives: directory does not exist: /usr/lib/jvm/java-9-oracle

Adding

addons:
  apt:
    packages:
      - oracle-java9-installer

from #7253 (comment) solves the issue.

the8472 commented Aug 6, 2017

The following currently does not work for me

sudo: required
dist: precise
group: edge
jdk: oraclejdk9

the log shows

$ jdk_switcher use oraclejdk9
Switching to Oracle JDK9 (java-9-oracle), JAVA_HOME will be set to /usr/lib/jvm/java-9-oracle
update-java-alternatives: directory does not exist: /usr/lib/jvm/java-9-oracle

Adding

addons:
  apt:
    packages:
      - oracle-java9-installer

from #7253 (comment) solves the issue.

@stale

This comment has been minimized.

Show comment
Hide comment
@stale

stale bot Apr 13, 2018

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

stale bot commented Apr 13, 2018

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues

@stale stale bot added the stale label Apr 13, 2018

@stale stale bot closed this Apr 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment