Reputation: 19
I am trying to run a program that has been compiled on version 55.0 but my compiler only accepts versions up to 52.0. I am not sure if this information is useful or not but the program has been written using visual studio. I have;
Still nothing seems to fix the problem. I have encountered this problem before and saw a bypass command of some description which allowed my program to run but stupidly forgot to record it. Alternatively solutions that fix the problem entirely are more than welcome :).
Upvotes: 0
Views: 993
Reputation: 718728
The short answer is that you can't.
If you want to run that program you have two options:
Install a newer version of Java on your machine. The program's bytecode version number is 55, so that means that you need to install Java 11 or later.
Get hold of the source code for the application (and if necessary, its dependent libraries) and build it for the Java 8 platform (version 52).
If you are not a Java programmer, this may be difficult. If you cannot get the source code for the program it will be (virtually) impossible.
Note that it is possible to have multiple versions of Java installed on a machine. Once you have the correct version of Java installed, it is possible to select the version you want to use. The simplest way is to use the full path of the java command; e.g.
> C:\Program Files\Java\jdk...\bin\java
Alternatively, modify the PATH variable, either in the command shell itself or via the Windows settings. (I assume that understand, or can find out, how Windows environment variables and specifically PATH work.)
Looking at the screenshot of your command prompt, it looks like you also maybe in the wrong directory when trying to compile and/or run things. Read about how the classpath works when compiling and running Java code.
Upvotes: 3