Cannot determine path to 'tools.jar' library for openjdk-18 - java

I am working with Maven for the first time. But I couldn't progress because of the error. I tried many things like Invalidate Caches, JDK version, Maven version etc. How can I fix it?
enter image description here
Intellij 2020.02
JDK 14

Your IntelliJ IDEA version has no support for JDK 18 as this IDE version was released long before JDK 18 which has introduced some changes to the layout and required updated support from the IDE side. Please update to the current IDE release.

Related

Eclipse Java 15 support not working, compiler does not show correct version

I have followed the steps in https://marketplace.eclipse.org/content/java-15-support-eclipse-2020-09-417 to install the Java 15 support for Eclipse after previously upgrading my Eclipse to 2020-12 (4.18.0). However it doesn't work (compiler not showing version above 12), and build path does not recognize a JDK 15 when added manually:
I wonder if the small red plus icon next to the Java 15 plugin in the third screenshot means anything.
Any help is appreciated.
In your last screenshot, the two items whose version ends with _JAVA15_PATCH should not be there and the Eclipse Java Development Tools is too old (according to the version number ...v201906..., released June 2019 instead of December 2020) to support Java up to version 15.
To get Java 15 support, update the Java Development Tools (JDT):
In the Eclipse IDE Installation Details dialog select the two items whose version ends with _JAVA15_PATCH and click Uninstall... (they might prevent updating JDT)
In Window > Preferences: Install/Update > Available Software Sites add the update site http://download.eclipse.org/releases/latest if it not yet exists
Run Help > Check for Updates to update JDT

Plugin for Java 15 support in eclipse 2020-09 no longer available

This question is similar to this one. I know you need to have this plugin to support Java 15 in eclipse 2020-09, however, it doesn't seem to be available any longer.
When I try to install it via the marketplace, I am getting this error:
No repository found at
https://download.eclipse.org/eclipse/updates/4.17-P-builds/.
Is there a way to install it from other sources?
I know that eclipse 2020-12 has been released, but we cannot use it due to bug #569498 (which didn't happen in eclipse 2020-09). So we would really need a way to install Java 15 support in eclipse 2020-09.
Because of regressions in 4.18, I decided to recreate 4.17-P-builds repository.
Please note this will be available till 4.19 is released or we decide to create a patch for 4.18 release.
I got a answer from the eclipse forums
Java 15 support is included in eclipse 4.18(2020-12). As part of
cleaning old releases we removed 4.17-P-builds repo as it is not
supported anymore.
Please upgrade to 2020-12 to continue work on java 15

java 8 support for Eclipse Indigo [duplicate]

I just read How to have Eclipse use JDK8 to compile a project?
What i added jdk8 to eclipse as,
From the answers of How to have Eclipse use JDK8 to compile a project?
I tried to Update the JDT/Core, JDT/UI bundles from http://dist.springsource.com/snapshot/TOOLS/java8/e43
But it shows error as,
"Eclipse Java Development Tools Patch for Java 8 Support (BETA)" is not applicable to the current configuration and will not be installed.
"Eclipse Plug-in Development Environment Patch for Java 8 Support (BETA)" is not applicable to the current configuration and will not be installed.
How Can i fix it ?
I can say that Java 1.8 does in fact work with Eclipse Luna ( the beta version released around March 17, 2014) or later. I tried it and it was good.
Also, I noticed that in the Eclipse Marketplace, there are now plugins to install functionality into Kepler to support JDK1.8. I haven't tried the plugin myself though.
This is a old topic but I just wanted to point out that I have searched enough to find that Indigo version can't be updated to S.E 1.8 here the link which is given on eclipse website to update the Execution Environment but if you try it will throw error for Indigo.
Here is the link where the Information about execution environment is given.
This shows the step by step to update Execution environment.
I have tried to update Execution environment and I got the same error.

Eclipse PDE: Syntax error, type annotations are available only when source level is at least 1.8

I am having hundreds of the same error: Syntax error, type annotations are available only when source level is at least 1.8 after installing the WindowBuilder Eclipse plug-in. My setup is with Java 7, and I cannot upgrade to Java 8 yet. I have Java 7 and 8 installed, but my JRE and compiler are set to Java 7 via Window > Preferences > Java.
I believe that I found the problem, which is related to the org.eclipse.jdt.annotation plug-in, described here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=434033
Any suggestions on how to fix this problem?
I noticed that I now have two org.eclipse.jdt.annotation plug-ins, versions 1.1.0 and 2.0.0. The problem is that 2.0.0 has a dependency on Java 1.8, and all of my plugins are referencing 2.0.0. I believe that changing these references to the earlier version should solve this, correct? How can I do this?
As a test, I altered my manifest file on one of my plug-in projects, but it does not remove the errors. Here is an excerpt where I tried to reference the 1.1.0 bundle version:
Require-Bundle: org.eclipse.ui,
org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.jdt.core,
org.eclipse.ltk.core.refactoring,
org.eclipse.jdt.ui,
com.kivancmuslu.www.solstice.common,
com.kivancmuslu.www.util.eclipse,
com.kivancmuslu.www.util.eclipse.ui,
org.eclipse.ui.workbench.texteditor,
org.eclipse.ui.ide,
org.eclipse.ui.editors,
org.eclipse.jface.text,
com.kivancmuslu.www.utils,
org.eclipse.ui.console,
org.eclipse.jdt.annotation;bundle-version="1.1.0"
UPDATE
Yes, I am running Luna. After changing the last line of my manifest from
org.eclipse.jdt.annotation;bundle-version="1.1.0"
to
org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)"
the errors are gone. Thank you.
Big thanks to #greg-449 for bringing up the suggestion mentioned in the bug report, the credit goes to him. I am posting this answer for completeness and to help others:
Yes, I am running Luna. After changing the last line of my manifest from
org.eclipse.jdt.annotation;bundle-version="1.1.0"
to
org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)"
the errors are gone.

Eclipse + Java 8 support?

How can I get Java 8 to work with Eclipse?
I have followed this guide but doesn't work. I've also seen the Eclipse Java 8 wiki page, but they don't explain what to do with the checked out git repositories.
For Kepler SR2 (4.3.2) a feature patch needs to be installed in order to get JAVA 8 support. Follow these steps:
Eclipse - Help (MENU) > Install New Software...
enter the following URL into the 'Work with' field:
http://download.eclipse.org/eclipse/updates/4.3-P-builds/
press 'Enter'
select category 'Eclipse Java 8 Support (for Kepler SR2)'
click 'Next'
click 'Next'
accept the license
click 'Finish'
restart Eclipse when asked
source: link
#Elisabeth
In order to have the desired JRE/ JDK on BuildPath, follow these steps.
Right click on Project from Package Explorer
Select BuildPath and then select Configure Builpath
Select Libraries Tab from the popped up Properties window
Select the current JRE System Library
Click Remove button
Click on Add Library button
Select JRE System Library
There you will be able to add your desired JRE/ JDK version using 3 different methods.
If you don't find your desired version of JRE/ JDK there in those 3 options, then you will have to install that first. The following link helps you in detail with screen shots to do the same. Hope it helps.
source: link
As written in https://wiki.eclipse.org/JDT_Core/Java8 :
"Starting with I20140318-0830 all our Luna (4.4) builds contain the Eclipse support for Java™ 8. For Kepler SR2 (4.3.2) a feature patch is available. "
So right now you need to download a non stable eclipse release.
Go to :
http://download.eclipse.org/eclipse/downloads/
There download a release older than or equals to I20140318-0830
Then you choose your version according to your OS :
click on the (http) link, the download will start :
Note that according to eclipse website :
Java™ 8 has not yet landed in our standard download packages. But you can add it to your existing Eclipse Kepler SR2 package. It will be included in the Luna packages starting with M7 on May 9/2014.
so after May 9/2014 getting eclipse working with java 8 will be simpler.
Now that Java 8 has shipped, Eclipse has released support for it. Java 8 is available as an 'update' for Eclipse Kepler (Eclipse 2013 release) and is available in integration / nightly builds towards Eclipse Luna (Eclipse 2014 release). For more information about enhancements and how to install it in your current version of the IDE, see http://eclipsesource.com/blogs/2014/03/25/eclipse-support-for-java-8/
It appears that this is still very much a work in progress (hence, there will be stability issues). Is there a particular reason you want to use Java 8?
This explains what you should be doing:
Checkout the BETA_JAVA8 branch of the following git repositories:
JDT/Core repository - git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git
You need to install a JDK8 build as an installed JRE in order to run the tests using the JavaSE-1.8 Execution Environment.
For more information on how to work with git repositories, look at http://wiki.eclipse.org/Platform-releng/Git_Workflows .
As API Baseline, use 3.8 (or 3.8 RC4 until 3.8 is released).
I have not downloaded this repo, but I would assume it contains the eclipse jdt core (as the name states). I would just wait until a stable release is finished.
As already stated here:
The Kepler release does not include Java 8 support, as Java 8 still isn't released yet. Try again with the next Eclipse release or use Eclipse beta releases like the one by e(fx)clipse. Have a look at this bug report from time to time for progress on Java 8 in Eclipse's JDT.
EDIT: Starting with I20140318-0830 all Luna (4.4) builds contain support for Java 8. The final version of Eclipse Luna (4.4) will be released at the end of June 2014. For Kepler SR2 (4.3.2) a feature patch needs to be installed.
Link to the Eclipse Java 8 support Update site
https://wiki.eclipse.org/JDT/Eclipse_Java_8_Support_For_Kepler
For Eclipse Mars.1 Release (4.5.1) you have to download extra package with
jre-8u73-windows-x64.tar.gz
to your java8/jre folder and point it in -VM section in eclipse.ini. It works for me.

Categories

Resources