Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse and JDK
Eclipse and JDK [message #1847503] Fri, 29 October 2021 10:38 Go to next message
Gaspare Pero is currently offline Gaspare PeroFriend
Messages: 3
Registered: October 2021
Junior Member
Hi, I am from Italy, and sometimes I enjoy creating some little programs in Java, SE level.
I usually use Notepad++ for writing code and Windows 10's prompt for compiling (javac) and running (java).
JDK and JRE are installed on my computer, and system variables are set (just because prompt runs java commands).

Yesterday I tried Eclipse, the more "simple" and recent version, for Java developers, discoverying it has its own JRE; the installer asked me which JRE I want to use, between those detected in my computer and the "internal" ones, but there is no request for JDK to set something as is the case for NetBeans I used earlier.
Looking several sites, I have read that Eclipse on Windows may work using "only" JRE, but JRE is for the execution, cannot compile because the javac command is into JDK library... Which sparked a doubt in me. After all, if I start to write System, Eclipse already offers me suggests to complete the instruction, so it doesn't seem to me that it deals only with execution (JRE).

Basically my question is: on a computer that does not have Java pre-installed, does Eclipse work the same using "its" JRE only?
And in 2nd: are a Setting tab in Eclipse where I can say it where JDK is?

Thanks.
Re: Eclipse and JDK [message #1847514 is a reply to message #1847503] Sat, 30 October 2021 06:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Eclipse has its own built-in incremental compiler so it does not need (nor use) javac from a JDK. So yes, Eclipse's Java Development Tools (JDT) will function with only a JRE.

The JREs you see as choices in the installer come from JustJ:

https://www.eclipse.org/justj/

It provides JREs that include debug information in the modules/jars as well as a src.zip with all the Java sources, so these JREs are as good as a JDK for most Java development purposes.

The JRE/JDK of the running IDE will be the default JRE used by JDT in each new workspace. You can see this in Window -> Preferences -> Java -> Installed JREs where you can of course add or change the JREs/JDKs being used at development time in the IDE.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse and JDK [message #1847515 is a reply to message #1847503] Sat, 30 October 2021 06:15 Go to previous messageGo to next message
Eitan Rosenberg is currently offline Eitan RosenbergFriend
Messages: 139
Registered: October 2018
Senior Member
Hi,

I also use java for my own mental exercise.... Using "Eclipse IDE for Java Developers".

I "install" eclipse by unzipping eclipse-java-2021-09-R-win32-x86_64.zip (in may case G:\MyEclipse\eclipse).

Looking at the setting tab, Eclipse now days come with its own JRE.

index.php/fa/41206/0/

This JRE also have javac.exe, so we have the whole show.

index.php/fa/41207/0/

This setting tab also allows us to add other JDK. In my case I have OpenJDK 17 in C:\Java

Regards.


Re: Eclipse and JDK [message #1847524 is a reply to message #1847514] Sat, 30 October 2021 14:08 Go to previous messageGo to next message
Gaspare Pero is currently offline Gaspare PeroFriend
Messages: 3
Registered: October 2021
Junior Member
Ed Merks wrote on Sat, 30 October 2021 06:06
Eclipse has its own built-in incremental compiler so it does not need (nor use) javac from a JDK. So yes, Eclipse's Java Development Tools (JDT) will function with only a JRE.

Thanks a lot!
Re: Eclipse and JDK [message #1847525 is a reply to message #1847515] Sat, 30 October 2021 14:09 Go to previous message
Gaspare Pero is currently offline Gaspare PeroFriend
Messages: 3
Registered: October 2021
Junior Member
Eitan Rosenberg wrote on Sat, 30 October 2021 06:15
Hi,

I also use java for my own mental exercise.... Using "Eclipse IDE for Java Developers".

I "install" eclipse by unzipping eclipse-java-2021-09-R-win32-x86_64.zip (in may case G:\MyEclipse\eclipse).

Looking at the setting tab, Eclipse now days come with its own JRE.

index.php/fa/41206/0/

This JRE also have javac.exe, so we have the whole show.

index.php/fa/41207/0/

This setting tab also allows us to add other JDK. In my case I have OpenJDK 17 in C:\Java

Regards.



Perfect! Many thanks.
Previous Topic:Does Eclipse 2021-09 support running java 1.7 unit tests?
Next Topic:Eclipse Terminal Console Display Error
Goto Forum:
  


Current Time: Sat Apr 20 02:25:10 GMT 2024

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

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

Back to the top