Skip to content
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 extra Java for IDEs via EXTRA_JAVA_VERSION #678

Closed
hohwille opened this issue Jan 10, 2022 · 0 comments · Fixed by #679 or #682
Closed

Support extra Java for IDEs via EXTRA_JAVA_VERSION #678

hohwille opened this issue Jan 10, 2022 · 0 comments · Fixed by #679 or #682
Labels
eclipse related to Eclipse IDE enhancement New feature or request intellij IntelliJ IDE from Jet-Brains java related to Java code, the Java Virtual Machine and directly related tooling (OpenJDK, Adoptium) setup related to the setup process of devonfw-ide (setup[.bat] and devon ... setup) update related to updating software or the entire devonfw-ide

Comments

@hohwille
Copy link
Member

In some projects we are forced to develop with older Java versions (e.g. Java8).
On the other hand some tools like e.g. Eclipse and its plugins may already require a newer Java version (e.g. Java11) to work.
For some projects this already results in inconsistencies that cannot be resolved by the project:

  • they need to have the build with the older Java version
  • but with that older Java version Eclipse is not working anymore and still if the project configures an older Eclipse release, the plugin update sites can not be pointed back to older states and those are simply lost and gone.

The only possible workaround for a project might be to conserve a working eclipse with all required plugins archived as *.tgz file and configured as custom-tool or by its own software-repo. However, this will break platform-compatibility or require a large amount of work for the ide admin of that project. The actual idea of devonfw-ide is to automate, make things easier, faster and reduce efforts.

Therefore, with this story we should consider the following:

  • introduce a new optional variable EXTRA_JAVA_VERSION
  • if this variable is present, the java commandlet will assert that it is different from JAVA_VERSION and install another Java of that version to software/extras/java (EXTRA_JAVA_VERSION) in addition to software/java (JAVA_VERSION). The extras subfolder will prevent that this extra Java will be automatically added to the PATH.
  • when an Java-based IDE is launched (e.g. Eclipse oder IntelliJ) and the EXTRA_JAVA_VERSION is present or the software/extras/java directory is present, that will be used to launch this IDE.
  • Inside the IDE the default JRE can still be configured to JAVA_HOME (.../software/java) so also when compiling code and running tests the project will use the regular Java (JAVA_VERSION).

Due to continuous updates and the fact that Eclipse and its ecosystem is unwilling and unable to provide stable (e.g. versioned) plugin Update Sites, I see this as a good solution to prevent the problematic project situation described above.
And if it is not for the update from Java8 to Java11 the same problems will follow from Java11 to Java17 and so forth so I see this story as a reasonable future invest for Java project support.

@hohwille hohwille added enhancement New feature or request eclipse related to Eclipse IDE intellij IntelliJ IDE from Jet-Brains setup related to the setup process of devonfw-ide (setup[.bat] and devon ... setup) java related to Java code, the Java Virtual Machine and directly related tooling (OpenJDK, Adoptium) update related to updating software or the entire devonfw-ide labels Jan 10, 2022
hohwille added a commit to devonfw/ide-settings that referenced this issue Jan 10, 2022
@hohwille hohwille changed the title Consider additional Java for IDEs Support extra Java for IDEs via EXTRA_JAVA_VERSION Jan 10, 2022
@hohwille hohwille added this to the release:2021.12.004 milestone Jan 10, 2022
@hohwille hohwille linked a pull request Jan 10, 2022 that will close this issue
@hohwille hohwille linked a pull request Jan 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
eclipse related to Eclipse IDE enhancement New feature or request intellij IntelliJ IDE from Jet-Brains java related to Java code, the Java Virtual Machine and directly related tooling (OpenJDK, Adoptium) setup related to the setup process of devonfw-ide (setup[.bat] and devon ... setup) update related to updating software or the entire devonfw-ide
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant