This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Production-Ready Serverless (Operational Best Practices) and have Yan Cui on-line!
See this thread for details.
Win a copy of Production-Ready Serverless (Operational Best Practices) this week in the Cloud/Virtualization 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
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Where is JRE 11 for JDK 11?  RSS feed

 
Ranch Hand
Posts: 193
2
  • 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?
 
Marshal
Posts: 63777
209
  • 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: 193
2
  • 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: 193
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, should I just uninstall the jdk 10?
 
Campbell Ritchie
Marshal
Posts: 63777
209
  • 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: 193
2
  • 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: 63777
209
  • 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: 193
2
  • 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]
 
Bartender
Posts: 2216
47
Firefox Browser IntelliJ IDE Java Linux Spring
  • Likes 1
  • 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: 63777
209
  • Likes 1
  • 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: 193
2
  • 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: 63777
209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you started a new command line?
 
Biniman Idugboe
Ranch Hand
Posts: 193
2
  • 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: 193
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
Campbell Ritchie
Marshal
Posts: 63777
209
  • 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?
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
global solutions you can do in your home or backyard
https://coderanch.com/t/708587/global-solutions-home-backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!