Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Students run Java 8. I need Java 8 to make applications. What Eclipse IDE is best?(Trying to figure out dependencies. If I make an application using Java 12, when I give it to someone with JRE 8 it won't work. )
Students run Java 8. I need Java 8 to make applications. What Eclipse IDE is best? [message #1806171] Sat, 04 May 2019 19:06 Go to next message
Patrick Moran is currently offline Patrick MoranFriend
Messages: 143
Registered: March 2018
Senior Member
Is there a chart somewhere that shows what Java Run Environments will be able to handle Java programs produced by what Java Development Environments?Is there any cross-compatabiliy at all?

Is there a way for anybody who is not a developer to download JREs for Java 11 or 12?

Re: Students run Java 8. I need Java 8 to make applications. What Eclipse IDE is best? [message #1806176 is a reply to message #1806171] Sun, 05 May 2019 02:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30442
Registered: July 2009
Senior Member
It sounds like you'd want to install the Eclipse IDE for Java which includes Eclipse Java Development Tools (JDT). JDT has its own compiler and is able to produce .class files that target (are compatible with) any version of Java. The latest version of Eclipse requires Java 8 to run but can run with Java 8 or higher, and as I mentioned it can produce .class files that run with any Java version because JDT's JRE preferences can be configured to know about multiple different JREs/JDKs that you might have available, so yes "cross-compatibility" is well supported. I don't believe Java 11 and Java 12 are shipping just regular JREs these days. I believe that's because there are some tools in the JDK that can be used to create a JRE that selectively includes only the things actually needed in the JRE (a subset of what's in the JDK).
Re: Students run Java 8. I need Java 8 to make applications. What Eclipse IDE is best? [message #1806178 is a reply to message #1806176] Sun, 05 May 2019 05:15 Go to previous messageGo to next message
Patrick Moran is currently offline Patrick MoranFriend
Messages: 143
Registered: March 2018
Senior Member
That sounds like exactly what I have been looking for. I wonder why when people are installing Eclipse they are directed to use JDK 12?

I could have gone on forever without your advice. Looking at the way JDT is described I would never have understood.

Thank you very much
Re: Students run Java 8. I need Java 8 to make applications. What Eclipse IDE is best? [message #1806180 is a reply to message #1806178] Sun, 05 May 2019 06:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30442
Registered: July 2009
Senior Member
Where do you find such direction to use JDK 12?

Certainly when the installer on Windows doesn't find an appropriate Java installation, the directions generally suggest installing Java 8 as the best default choice (most likely to be compatible with all Eclipse versions you might install):

https://download.eclipse.org/oomph/jre/index-handler.php?vm=1_1_8_0_64_0&pn=Eclipse%20Installer&pu=http://wiki.eclipse.org/Eclipse_Installer&pi=http://download.eclipse.org/oomph/jre/128x128.png
Re: Students run Java 8. I need Java 8 to make applications. What Eclipse IDE is best? [message #1806188 is a reply to message #1806180] Sun, 05 May 2019 14:45 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1434
Registered: July 2009
Senior Member
Some additional information regarding the difference between a JDK and a JRE. A JDK includes tools to build and run java programs. A JRE only includes the tools to run java programs. Essentially, a JDK contains all of the features included in a JRE. In addition, it provides a compiler, debugger and other monitoring/profiling tools. Put another way, a JRE is a subset of a JDK without the development tools. The JRE is the minimal set of features necessary to run Java programs. If all you have installed on your PC is a JRE you can run java programs but can't build or debug them. The smaller JRE reduces the footprint necessary to run Java programs. Initially, the Sun license (eventually bought by Oracle) for the JDK allowed you to redistribute a JRE with you program. Oracle has apparently stopped providing a separate JRE with Java 11 and later. However, they appear to have included tools in the JDK to allow developers to create their own JRE.

If you interest is in developing Java applications or teaching Java development, then you will likely want to install the JDK. You would only need to worry about a JRE if you planned to distribute your applications to computers that weren't being used a development machines.

Eclipse requires a Java VM in order to run. At a minimum that means a JRE, but since the JDK includes the Java VM, you can run Eclipse on a JDK. In fact the preferred method for Java development is to run Eclipse on a JDK. One of the extra features provided by a JDK is the full source code for the Java runtime libraries. Having this available when developing Java applications is a great help. When you run Eclipse on a JDK with source installed, it will automatically find the source for source lookups.

The Eclipse Java preferences refer to JREs and this may cause some confusion. The configured Java installations on the JRE preference page can point to both JDKs and JREs.

My recommended setup for Java development would be to install a JDK and launch Eclipse using the JDK. Make sure that the Installed JREs has an entry for the JDK you want to develop against.
Re: Students run Java 8. I need Java 8 to make applications. What Eclipse IDE is best? [message #1806231 is a reply to message #1806188] Mon, 06 May 2019 15:35 Go to previous messageGo to next message
Patrick Moran is currently offline Patrick MoranFriend
Messages: 143
Registered: March 2018
Senior Member
Thanks for the information.

I think the idea to use the IDE is what I need at this point. The only thing is that I installed it and have had problems with the while I used to be able to make JARs that would open and operate properly on my Mac but not on my HP, the same code used with the IDE now will not even open and operate properly on my Mac. The software, opened/operated from Eclipse works fine, but the JARs fail. Part of the problem seems to be that the combination of JRE included with the IDE and the software in the JAR itself (somewhere in there I think) can no longer identify the subdirectory where the JAR is, and that means that it loses the ability to do things like access the sqLite DBs located in the same subdirectory.

I am now trying to get the IDE off my system and reinstall the previous setup in the hope that I can at least restore the ability to make JARs that can be sent to others who also have Macs.

It may be that I cannot operate from the IDE and the old setup on the same computer at the same time because they will perhaps share access to stores of information regarding various settings. I'm not sure of that. I just know that I have to start over and take better notes this time.

[Updated on: Mon, 06 May 2019 15:38]

Report message to a moderator

Re: Students run Java 8. I need Java 8 to make applications. What Eclipse IDE is best? [message #1806261 is a reply to message #1806231] Tue, 07 May 2019 07:33 Go to previous message
Patrick Moran is currently offline Patrick MoranFriend
Messages: 143
Registered: March 2018
Senior Member
My Mac's HD will have to be scrubbed. Fortunately I have not lost much data, it's just that there is some kind of problem that the drive repair cannot fix, which means I'd better copy everything off before the disk drive develops some more serious symptoms. It was not a good idea to install two copies of Eclipse on the same computer.

I was afraid that I might have lost everything, but when I went back to my HP I. was able to get the same program to compile successfully. Strange though it may seem, The JAR was moved onto a thumb drive which I used to transport it to the Mac. I created a series of nested folders about 5 or 6 deep, but the Mac didn't try to look for the JAR files in some place of its own malevolent will. It had no trouble accessing everything, even though it was buried deep in those nested sub-directories. That is how the Mac has always performed with any software I've purchased or made myself. Assuming that putting my stuff up on my website and proving to myself that the Windows world can still deal with it properly,

I still find it strange that the same code compiled on Eclipse on both the Mac and the Windows computers fails when the HP tries to run stuff prepared on the Mac, but the Mac succeeds when running the same code compiled on my Windows computer.

Thank you all for your help and suggestions.
Previous Topic:Keeping Eclipse Standalone Help window always on top
Next Topic:Breakpoint in assembler file
Goto Forum:
  


Current Time: Mon Sep 16 14:21:06 GMT 2019

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

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

Back to the top