-
Notifications
You must be signed in to change notification settings - Fork 209
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
Creating a Spring Starter with Gradle and Java 11 does not work #89
Comments
The Java 11 support for Eclipse platform is still experimental not yet included in the STS 4 build. You can try it out though, but you have to install it manually from Eclipse marketplace: https://marketplace.eclipse.org/content/java-11-support-eclipse-photon-49 |
The support that is available works for basic Java projects, but the Maven support (and the same applies probably to the Gradle integration for Eclipse) isn't ready for Java 11 yet. Looks like we need to wait for the next Eclipse release to get real Java 11 support across the various pieces. |
Creating it as a Maven project actually works, but Gradle (my preference) does not. As you said, we will perhaps have to wait for the next Eclipse release to properly support Java 11. Are you gong to have STS4 releases to correspond to the Eclipse release cycle? |
I'm not sure how well it will hold up if you really use it in earnest but I just tried setting up a gradle project and it seemed to be working. Here's what I did:
A bit to my suprise the generated project didn't atually select Java 11 in the I worked around this problem simply by opening Maybe give those steps a try and see if it works for you. |
You can give it a try, as Kris described, but I have the Java 11 support installed and quickly tried Maven for creating a project, but I immediately run into issues... :-( And yes, we will push out new Spring Tools 4 releases quickly after new Eclipse releases are being released (as we did in the past with STS3). There is no exact release plan yet, but I expect us to release in even shorter release cycles than Eclipse. |
Looks like Martin already reported this problem for maven projects. So I just added a note about gradle also being broken. |
In addition to that I also run into: |
@kdvolder You were correct about the version issue. I followed all your steps, but am still facing the same issue. Moreover, if I try to import the project as a Gradle project, on the import preview, I get all the home directories as unknown, due to which the import fails too. |
Some quick feedback on the ticket we raised with spring initalizr showed us that the downgrade Java 11 -> 1.8 isn't actually a bug but done deliberately because Boot 2.0 doesn't support Java 11. So you have to make sure to select Boot 2.1 version. That doesn't necessarily mean everything will just work if you do that, might still run into some tooling issues. But at first blush when I do this it creates a correctly configured project for me. |
@kdvolder Thanks for the info. I wasn't aware of this either. I tried the 2.1.0.M4 version but am still facing the same issue where the Gradle import does not get any of the Home Directories... |
@abhishek2bommakanti Seems to work for me. This sounds like something about your workspace or system (environment variables?) that is confusing buildship. I have no idea what it might be. But I don't typically use Gradle so I don't have gradle on my path, or any gradle related stuff in my system environment variables. And I didn't make any changes in the Eclipse workspace preferences regarding Gradle. Pertty much the only special thing about my workspace is that I manually added a JDK 11 to it. If you don't have a setup like that perhaps something about your setup is confusing BuildShip so it can't work out which version of Gradle to use, or which version of Java to run it with. For comparison here's how it looks like when I use the BuildShip import wizard: |
BTW: We are not the best people to help trouble-shoot your BuildShip problem. I'm not really sure how BuildShip tries to determine the Java home, but it seems that is somehow failing for you. If you can't figure it out, perhaps the best course of action would be raise an Eclipse bugzilla ticket against BuildShip. Perhaps this is a BuildShip bug, or at the very least they might be able to help figure out why BuildShip can't figure out which version/installation of Java to use on your machine / workspace. |
Yep, I figure it’s a BuildShip issue. I’ve raised Bugzilla ticket https://bugs.eclipse.org/bugs/show_bug.cgi?id=539588 for this.
|
Thanks for cross-posting the bug reference, now lets see what happens on the buildship side. |
I'm trying to create a new Spring Starter project using Gradle and Java 11. The project creation fails with the following error:
IllegalArgumentException: Could not determine java version from '11'.
java.lang.reflect.InvocationTargetException
The text was updated successfully, but these errors were encountered: