Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Maven projects created with J2SE-1.5(I want Maven projects to be created with Eclipse's default JRE (currently 19))
Maven projects created with J2SE-1.5 [message #1855629] Mon, 24 October 2022 15:58 Go to next message
Phil Buxton is currently offline Phil BuxtonFriend
Messages: 1
Registered: October 2022
Junior Member
Please help me with a problem that is driving me up the wall. I have been scouring the internet for a solution for a couple of weeks and I can only find ways of correcting the problem after it has happened, not stopping it from happening in the first place.

OS: Windows 10
Java version: 19.0.1
Eclipse version: 2022-09

I have been using Eclipse for a few years and have upgraded a few times and upgraded my version of the JDK a few times too. I am a fairly novice programmer so I'll need some very specific instructions in plain English or a may not understand what I am being advised to do.

The default JRE selected in Eclipse under Installed JREs is jdk-19.

index.php/fa/42641/0/

When I create a Maven project (I don't use archetypes), my project ends up with a folder called JRE System Library [J2SE-1.5], which is obviously the runtime environment the project will use.

index.php/fa/42637/0/

Why aren't my Maven projects using my default JRE?


I have a couple of solutions to correct this, but I have to do it with every project. Firstly, I can add a dependency to the project's POM file. Secondly (see screenshots), I can go into the Properties of the project -> Java Build Path -> Libraries tab, where I select the 1.5 version and remove it, then add the JRE system library. Both of these fix it after the project's creation.

index.php/fa/42638/0/
index.php/fa/42639/0/
index.php/fa/42640/0/

How do I get it to give me the right one in the first place? It seems that what I want to do is make the correction shown in the images at system level but I only know how to do it at project level, but I can't find a way of doing that.

I did find an article (which I'm not allowed to post a link to here) suggesting a solution but it mentions a .m2 file, but that doesn't exist on my computer as far as I can see.

Can anybody help? It's really bugging me.
Re: Maven projects created with J2SE-1.5 [message #1855714 is a reply to message #1855629] Fri, 28 October 2022 07:13 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
It's probably better to ask here:

https://github.com/eclipse-m2e/m2e-core/discussions


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Migrating a project to modules
Next Topic:Java: Open Implementation only opens the declaration
Goto Forum:
  


Current Time: Thu Apr 25 20:51:32 GMT 2024

Powered by FUDForum. Page generated in 0.02302 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top