This is my first application that i try to execute exe.
I'm using launch4j to do this. After executing and trying to run, I get this error:
Blockquote
Launch4j - Exception in thread "main" java.lang.UnsupportedClassVersionError: FakeMain 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 52.0
I searched something about versions of java, so I checked my versions of java and they are the same.
That's my versions of java:
My versions of java in cmd
Maybe I did something wrong there?
Screen of Launch4j
I don't know what I can do. I spend all this day about fix this and nothing.
Error after try to run exe file
You have compiled the code with Java 11 as target. But your PC want's to execute the Java Code with Version 8, which is not possible.
Make sure you have installed the correct Versions and also make sure that the executable uses Java 11.
Here you can find the Java Versions mapped to the Runtime Versions: Java Version Numbers
The Article gives you also some information about how to compile and execute for the correct versions.
This question already has answers here:
How can I get Java 11 run-time environment working since there is no more JRE 11 for download?
(4 answers)
Closed 3 years ago.
I'm trying to run a java application that I have compiled using the IntelliJ IDEA, by the commandline running the following command:
java myApp.Main
This gives me the following error:
"Exception in thread "main" java.lang.UnsupportedClassVersionError: FlightConverter/Main 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 52.0"
In IntelliJ the JRE set to run in the run configuration is: /Java/jdk-11.0.3, but I get the error above when I try to run it. When i type java -version in cmd I get "1.8.0_211"
I cant really seem to find out how to update my current JRE to match what is used by the compiler either? It seems I'm only able to find JRE 8.xx online
I'm sure you can get location of java 8 from local system and set that as a compiler in IntellIJ IDE.. This way both your system and IDE works only on Java 8 and everything will work fine...
Hope this helps...
I am using Idea with JDK1.8.0_201 and DCEVM-8u181-installer-build2. The installer seems to modify JDK without errors but when I try to run java -version or java -version -XXaltjvm=dcevm a system error pops up in my native language (I am using localised Win 7). The translation would be roughly "Entry point of procedure JVM_CopySwapMemory was not found in dynamically joined library jvm.dll".
What is the problem? Am I using incompatible versions of DCEVM and Java or does the problem lie elsewhere?
I am trying to understand the flow of code in the native android. For the same, I downloaded the Android source code and built images for my android device.
I have the following java and javac versions in my system.
javac 1.7.0_79
java version "1.7.0_79"
When I make, every thing works as expected. i am able to create images and my device boots with those as well. Now I added some simple Logs on some the files like: Android/frameworks/base/core/java/android/app/ContextImpl.java and performed a make again. I get the error : java.lang.UnsupportedClassVersionError: com/google/doclava/Doclava : Unsupported major.minor version 51.0. I am not able to understand why I get this error when I just add a few Logs in one of the files. It should have occurred right at the first make as well, or not? I read a lot about this error and found it is because of the mismatch between run time and compile time versions. But I have Java 1.7 and javac 1.7. Anyone faced this before?
I've just downloaded the latest version of the Play Framework (1.2.3) and am using it with the latest Scala plugin (0.9.1) and the Google App Engine module (1.4).
The default application works fine locally (at localhost:9000, the default port). I've also successfully published the default application to GAE using play gae:deploy.
However, when I go to the GAE remote URL, I get the standard error message:
Error: Server Error.
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it.
Here is the full stacktrace in the GAE logs: https://gist.github.com/1181257
I'm guessing the first error, the NPE, is due to something that can be easily fixed, so ignore that for now; however, note the second - critical - error, which says:
java.lang.UnsupportedClassVersionError: helpers/CheatSheetHelper$1 : Unsupported major.minor version 51.0
51.0 is (I think) the class version that the Java 7 compiler generates. Now, my question is simple:
How to force the Play Framework and its Scala plugin to compile the classes for GAE publishing using the -target 1.6 and -source 1.6 options, so that the output classes are 1.6 compatible, instead of the defaults, which make the local Java 7 installation generate 1.7 output classes?
Thanks.
[edit] As for the NPE, it seems that it's not thrown on Play 1.2.1 and the 0.9 version of the Scala plugin: Play framework with scala and GAE - again, this is just a side issue, the primary issue (getting Java 7 working) still stands. I've created a ticket for this: http://play.lighthouseapp.com/projects/74274-play-scala/tickets/45-nullpointerexception-on-google-app-engine
To get java 7 to work currently, you have to use the following configuration in your application.confirm file
java.source=1.6
See here for more details - VerifyError; Expecting a stack map frame in method controllers.Secure$Security.authentify
Java 7 is fully supported for Play 1.2.4 RC3 - give it a try and see if it solves your issues.
I just ran into the same issue. I'm running Java 7 and don't want to have all my other Java stuff run on 6 again. So, what I did was dump a copy of JDK 6 in a directory and then made a simple bash script to set the proper environment vars and call play. I then symlinked that script as "play" on my path. Now when play gets called it has a JDK 6 environment to run under without having to change everything else on the machine.
...less than ideal, but it works well enough and keeps everything clean.