๐ŸŒ
Eclipse IDE
eclipseide.org
Eclipse IDE | The Eclipse Foundation
Supports Java 24 and provides the necessary tooling for development.

software development environment

Eclipse is an integrated development environment (IDE) used in computer programming. It contains a base workspace and an extensible plug-in system for customizing the environment. It had been the most popular IDE โ€ฆ Wikipedia
Factsheet
Original author IBM
Initial release 1.0 / 29 November 2001; 24 years ago (2001-11-29)
Factsheet
Original author IBM
Initial release 1.0 / 29 November 2001; 24 years ago (2001-11-29)
๐ŸŒ
The Eclipse Foundation
eclipse.org โ€บ downloads โ€บ packages โ€บ release โ€บ juno โ€บ sr2 โ€บ eclipse-ide-java-developers
Eclipse IDE for Java Developers | Eclipse Packages
The essential tools for any Java developer, including a Java IDE, a CVS client, Git client, XML Editor, Mylyn, Maven integration and WindowBuilder
๐ŸŒ
OneCompiler
onecompiler.com โ€บ java โ€บ 3x7kw2kjf
Eclipse - Java - OneCompiler
import java.util.Scanner; class Input { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter your name: "); String inp = input.next(); System.out.println("Hello, " + inp); } }
Top answer
1 of 2
9

Eclipse has its own Java compiler, which is called [JDT Core][1] (org.eclipse.jdt.core). The compiler itself is included in the org.eclipse.jdt.core plugin. Eclipse won't use any user installed JDK. Instead it uses its own JDT core to compile Java program due to the following primary reason:

The primary reason is that JDT core has the ability of incremental compilation, which means that it incrementally compiles changes in your code (this is also why Eclipse does not need a compilation button because it automatically compiles when changes are detected). But Oracle's JDK does not support incremental compilation.

Does Eclipse's JDT core compiler include a JRE?

  • No. JDT core is different from JDK. JDT core is a compiler not including a JRE (while JDK includes JRE). This is why we must specify installed JREs for Eclipse to start.

In summary, Eclipse uses its own JDT core as the Java compiler. The JDT core compiler does not have a JRE. So Eclipse requires user installed JRE to run the .class code.

References:

[1] JDT Plug-in Developer Guide, http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Fguide%2Fjdt_api_compile.htm

[2] JDT Core Component, https://www.eclipse.org/jdt/core/

[3] How does Eclipse compile classes with only a JRE? How does Eclipse compile classes with only a JRE?

2 of 2
3

In contrast to other Java IDEs, Eclipse uses its own incremental compiler written in Java. It can display more warnings and errors than javac. Both, the Eclipse compiler and javac implement the Java Language Specification. There are corner cases where the two compilers produce different bytecode or one of them fails (e. g. see this Stack Overflow question).

The Eclipse compiler requires at least a JRE for the class files, e. g. java/lang/String.class. A JDK is only to see the source code, but not required by the Eclipse compiler.

So far Eclipse was not shipped with a JRE (see Eclipse bug 506244). But this could change soon after the Java virtual machine OpenJ9 became an Eclipse project.

๐ŸŒ
CodeJava
codejava.net โ€บ ides โ€บ eclipse โ€บ why-does-eclipse-use-its-own-java-compiler
Why does Eclipse use its own Java compiler?
If you are new to Java development with Eclipse IDE, you may be surprised that Eclipse doesnโ€™t use javac โ€“ the Java compiler provided by JDK. Instead, Eclipse implements its own Java compiler โ€“ based on the Java Language Specification (JLS).
๐ŸŒ
CodeJava
codejava.net โ€บ ides โ€บ eclipse โ€บ change-java-compiler-version-for-eclipse-project
How to change Java compiler version for Eclipse project
This warning means that no compatible JRE for Java 11 configured in Eclipse. So click the hyperlink Installed JREs, which pops up the following dialog: Click Add button. The next popup dialog appears: Make sure Standard VM is selected, and click Next. And in the next screen, click Directory to browse to JDK home or JRE home that supports the Java compiler version you want:
๐ŸŒ
Baeldung
baeldung.com โ€บ home โ€บ java โ€บ core java โ€บ difference between javac and the eclipse compiler
Difference Between Javac and the Eclipse Compiler | Baeldung
January 8, 2024 - But these two tools differ in some respect. To begin with, the javac compiler is a standalone tool that can be executed from the terminal. However, unlike javac, the Eclipse compiler is integrated with the Eclipse IDE.
Find elsewhere
๐ŸŒ
JetBrains
jetbrains.com โ€บ help โ€บ idea โ€บ java-compiler.html
Java Compiler | IntelliJ IDEA Documentation
On the Compiler | Java Compiler page, you can select the Java compiler to be used and specify associated options. For the information on configuring JDK, refer to Supported SDKs. If you are not happy with the version of the Eclipse compiler bundled with IntelliJ IDEA, you can use the Path to ECJ batch compiler tool option located in the Settings | Build, Execution, Deployment | Compiler | Java Compiler and specify a particular Eclipse compiler version.
๐ŸŒ
Coderanch
coderanch.com โ€บ t โ€บ 528054 โ€บ ide โ€บ Tutorial-Compile-Java-program-Eclipse
[Tutorial] How to Compile a Java program in Eclipse (IDEs and Version Control forum at Coderanch)
To do this right click on your project name which is "MyProject" in this case and select <strong>New->Class</strong>. Step 5: Enter the name of your class. Click finish. Step 6: Compiling To compile, just press the RUN button or the DEBUG button to the left of the run button.
๐ŸŒ
GitHub
github.com โ€บ eclipse-jdt โ€บ eclipse.jdt.core
GitHub - eclipse-jdt/eclipse.jdt.core
an incremental or batch Java compiler that can run standalone or as part of the Eclipse IDE
Starred by 215 users
Forked by 160 users
Languages ย  Java 96.9% | HTML 3.0% | GAP 0.1% | Roff 0.0% | Shell 0.0% | CSS 0.0%
๐ŸŒ
The Eclipse Foundation
eclipse.org โ€บ forums โ€บ index.php โ€บ t โ€บ 1069124
Eclipse Community Forums: Newcomers ยป How do I compile my Java project? | The Eclipse Foundation
The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 350 open source projects, including runtimes, tools and frameworks.
๐ŸŒ
Eclipse Marketplace
marketplace.eclipse.org โ€บ free-tagging โ€บ java-compiler-javac
java compiler javac | Eclipse Plugins, Bundles and Products - Eclipse Marketplace | Eclipse Foundation
Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client ... This fragment contains a Javac backend (instead of ECJ) for JDT features: error reporting/reconciling build/compilation indexing code selection (Ctrl + click / hover) code...
๐ŸŒ
Chrome Web Store
chromewebstore.google.com โ€บ detail โ€บ eclipse-ide-online โ€บ emnjgfpochdhhgimnoadiiinampoihkk
Eclipse IDE online - Chrome Web Store
- Incremental compilation. - Include a console that provides stdout, stdin, stderr. - Debug Java, C, PHP and Ruby programs. - Set breakpoints and handle steps that go through the whole source code. - When debugging it can inspect and modify fields and local variables. Further instructions can be found at http://www.eclipse...
Top answer
1 of 4
5

It would be normal to have a separate build process (e.g. with something like Maven) that does not use the Eclipse compiler which is responsible for producing the final deployable artifacts. For example, in all of my Eclipse Java projects I use:

  • The built-in Eclipse compiler for quick testing (JUnit), debugging and local execution
  • Maven to do the "real" builds (full test suite, building deployment artifacts etc.). Here Maven is using the version of the Java compiler that comes with my local JDK.
  • TravisCI (via GitHub) to do continous integration testing (which also uses Maven, but on remote machines)

You could in theory use the compiled Eclipse class files in production if you want - nothing to stop you packaging these up yourself and deploying them. But this would be a strange thing to do, since it would take a bit of effort and lose you the benefits of having a proper build setup.

P.S. if you want to get good that this stuff then I strongly suggest you invest in learning Maven. It's a steep learning curve but really worth it in the long run.

2 of 4
4

I've never seen the eclipse compiler's output being used for production in any professional or open source project. It probably would work just fine, but it's just not what you do.

Part of the reason is probably that eclipse is not quite as dominant as Visual Studio, another that build tools like Ant and Maven have always existed separate from the IDE, and there is a strong expectation to use them for build automation.

๐ŸŒ
Coderanch
coderanch.com โ€บ t โ€บ 606887 โ€บ ide โ€บ Eclipse-Compiler-default
Eclipse Compiler Is default (IDEs and Version Control forum at Coderanch)
But Today I am Using Latest version of eclipse JUNO It showing 1.3,1.4,1.5,1.6,1.7. And I have Selected 1.7. Dear Sir One more thing As you said its Take my system JDK but In my laptop ,there is not 1.3 Then Why Its showing 1.3 Or 1.5 In dropDown Or There Is no Effect To Choosen 1.3 Or 1.4 Its depend On the JRE Which The Eclipse is Using?? ... When you select a 1.7 JDK, you will see selections for as far back as 1.3 because you can compile to 1.3-compatible class files. See the Java compiler documentation regarding the -source and -target options: http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/javac.html If you previously created any projects, you might have to go into those projects and change the Java level in them; they will not be automatically updated to 1.7.
๐ŸŒ
Javatpoint
javatpoint.com โ€บ how-to-run-java-program-in-eclipse
How to Run Java Program in Eclipse - Javatpoint
How to Run Java Program in Eclipse with oops, string, exceptions, multithreading, collections, jdbc, rmi, fundamentals, programs, swing, javafx, io streams, networking, sockets, classes, objects etc,