Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Exported jar files not working
Exported jar files not working [message #1856867] Fri, 06 January 2023 07:40 Go to next message
Ercole Spiteri is currently offline Ercole SpiteriFriend
Messages: 1
Registered: January 2023
Junior Member
I installed eclipse on my system and the programs which I write run fine in the Eclipse IDE but when exported into a standalone jar file the created jar file will not work. If I try to run it from the command prompt with java -jar <jar filename> it tells me that the file was built with version 61 and the java version I have is 52 something. I installed the latest java runtime files so what I have wrong?
Re: Exported jar files not working [message #1856884 is a reply to message #1856867] Sat, 07 January 2023 07:09 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33264
Registered: July 2009
Senior Member
The class versions, according to this:

https://en.wikipedia.org/wiki/Java_version_history

suggest that you are trying to run .class files compiled for Java 17 on a Java 8 runtime.

So either install and use Java 17 to run the jar:

https://adoptium.net/

Or configure the IDE to target Java 8 as the runtime via Window -> Preferences -> Java -> Compiler.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Color Syntax recommendation request
Next Topic:Syntax Highlighting Problem
Goto Forum:
  


Current Time: Thu Jan 16 03:15:03 GMT 2025

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

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

Back to the top