This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Where is JRE 11 for JDK 11?

 
Biniman Idugboe
Ranch Hand
Posts: 246
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dowloaded jdk 11 , actually jdk-11.0.1_windows-x64_bin and installed it.  It did not come with jre 11 and I did not see jre 11 at the Oracle download site.  Now, I am not able to run codes compiled with jdk 11.

D:JavaStuff\CompiledCodes>java TradersAndTransactions
Error: LinkageError occurred while loading main class TradersAndTransactions
       java.lang.UnsupportedClassVersionError: TradersAndTransactions has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 54.0


I suppose I am required to install jre 11, but where can I find an authentic copy of jre 11?
 
Campbell Ritchie
Marshal
Posts: 65019
246
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They have stopped supplying a separate JRE, but it is included in the JDK anyway. The problem you have got is probably caused by retaining an old (?Java10) version of the JRE in your PATH. That is why you shoiuld always write the Java® PATH entry at the beginning of your PATH.
Please show us your PATH and the results of the following two instructions at the command line/terminal:-
 
Biniman Idugboe
Ranch Hand
Posts: 246
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
D:JavaStuff\CompiledCodes>java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)

D:JavaStuff\CompiledCodes>javac -version
javac 11.0.1
 
Biniman Idugboe
Ranch Hand
Posts: 246
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, should I just uninstall the jdk 10?
 
Campbell Ritchie
Marshal
Posts: 65019
246
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You probably only need to correct your PATH, which you didn't show us.
 
Biniman Idugboe
Ranch Hand
Posts: 246
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See my Java Path:
Java-Path.png
[Thumbnail for Java-Path.png]
 
Campbell Ritchie
Marshal
Posts: 65019
246
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first line says \Oracle\JavaPath. Investigate that carefully; you may find a Java10 JRE in there. Move your Java11 PATH entry to the beginning of the PATH.
 
Biniman Idugboe
Ranch Hand
Posts: 246
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oracle 11g is installed in the computer.  There is no JRE in the path \Oracle\JavaPath.
No-JRE-in-path.PNG
[Thumbnail for No-JRE-in-path.PNG]
 
Paweł Baczyński
Bartender
Posts: 2219
47
IntelliJ IDE Firefox Browser Spring Java Linux
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is java.exe in the path \Oracle\JavaPath.
Windows chooses this executable when you invoke java in the console.
Move your jdk11 path to the top.
 
Campbell Ritchie
Marshal
Posts: 65019
246
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Paweł Baczyński wrote:There is java.exe in the path \Oracle\JavaPath. . . .

That counts as a JRE.
 
Biniman Idugboe
Ranch Hand
Posts: 246
3
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java path has been moved to the to of the list, but problem remains.
Java-path-moved-to-top.png
[Thumbnail for Java-path-moved-to-top.png]
 
Campbell Ritchie
Marshal
Posts: 65019
246
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you started a new command line?
 
Biniman Idugboe
Ranch Hand
Posts: 246
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apology.  I relaunched the command prompt and the code runs now.
 
Biniman Idugboe
Ranch Hand
Posts: 246
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
Campbell Ritchie
Marshal
Posts: 65019
246
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a pleasure

Would you like to click the resolved button?
 
Tim Moores
Saloon Keeper
Posts: 5701
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anita Sahay,
Your post was moved to a new topic.
(This informational message will self destruct in two days)
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!