Easiest route is probably upgrading or re-installing the Java Runtime Environment (JRE).
Or this:
- Open the Windows Explorer, from the Tools select 'Folder Options...'
- Click the File Types tab, scroll down and select JAR File type.
- Press the Advanced button.
- In the Edit File Type dialog box, select open in Actions box and click Edit...
- Press the Browse button and navigate to the location the Java interpreter javaw.exe.
- In the Application used to perform action field, needs to display something similar to
C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe" -jar "%1" %(Note: the part starting with 'javaw' must be exactly like that; the other part of the path name can vary depending on which version of Java you're using) then press the OK buttons until all the dialogs are closed.
Which was stolen from here: http://windowstipoftheday.blogspot.com/2005/10/setting-jar-file-association.html
Answer from Brian Kelly on Stack OverflowEasiest route is probably upgrading or re-installing the Java Runtime Environment (JRE).
Or this:
- Open the Windows Explorer, from the Tools select 'Folder Options...'
- Click the File Types tab, scroll down and select JAR File type.
- Press the Advanced button.
- In the Edit File Type dialog box, select open in Actions box and click Edit...
- Press the Browse button and navigate to the location the Java interpreter javaw.exe.
- In the Application used to perform action field, needs to display something similar to
C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe" -jar "%1" %(Note: the part starting with 'javaw' must be exactly like that; the other part of the path name can vary depending on which version of Java you're using) then press the OK buttons until all the dialogs are closed.
Which was stolen from here: http://windowstipoftheday.blogspot.com/2005/10/setting-jar-file-association.html
In Windows Vista or Windows 7, the manual file association editor has been removed.
The easiest way is to run Jarfix, a tiny but powerful freeware tool. Just run it and your Java apps is back... double-clickable again.
java - how to run or install a *.jar file in windows? - Stack Overflow
How do I run .jar programs on linux in general?
executable jar - Do you need java installed to run jar files? - Stack Overflow
How run .jar file
Videos
Have you tried (from a command line)
java -jar jbpm-installer-3.2.7.jar
or double clicking it with the mouse ?
Found this and this by googling.
Hope it helps
The UnsupportedClassVersionError means that you are probably using (installed) an older version of Java as used to create the JAR.
Go to java.sun.com page, download and install a newer JRE (Java Runtime Environment).
if you want/need to develop with Java, you will need the JDK which includes the JRE.
I run gentoo, and have installed a dual boot of debian 12 to confirm that just installing java, jre, and openjdk does in fact not allow me to run .jar programs.
I am trying to install fabric to minecraft so I can add some mods to minecraft I want. Except that even with the software from here: https://wiki.gentoo.org/wiki/Java
and from here: https://packages.gentoo.org/packages/dev-java/openjdk
does not give me any program to open my fabric installer jar program to install it with. I have set the jar as a executable, but it still won't let me open it with any java programs. There are none.
Any help, even lazy help, is appreciated. Thank you for reading
FIX: you run them in terminal, which confused me since the tutorial I watched showed it as a program. Thanks for the help people. Haven't modded minecraft since I used windows
The . syntax can only be used to run (by "sourcing") shell scripts.
You'll need to use the java command to run a .jar file:
java -jar Minecraft.jar
If you don't have java installed, you can fix that by installing the default-jre¹ package. You can see if you already have java installed by running in a terminal:
java -version
[1]: This will install the default openjdk Java runtime. You can use openjdk-8-jre, or openjdk-7-jre, or openjdk-6-jre instead, if you prefer - whichever is available on your version of Ubuntu.
Linux is perfectly capable of running a foreign binary, like a JAR file. This is how Wine works, for example. To run JAR files as executable first make sure you have Java installed, then do the following in a console:
Install binfmt-support Support for extra binary formats:
The binfmt_misc kernel module, contained in versions 2.1.43 and later of the Linux kernel, allows system administrators to register interpreters for various binary formats based on a magic number or their file extension, and cause the appropriate interpreter to be invoked whenever a matching file is executed. Think of it as a more flexible version of the #! executable interpreter mechanism.
sudo apt-get install binfmt-supportcdto your JAR file and change it to executable (you can also do this through file properties in Nautilus)chmod a+rx myjar.jarRun your jar file just as if it was any other binary executable or shell script
./myjar.jar
Note: Be sure you have binfmt_misc Linux kernel module loaded. If you use your custom compiled kernel without this module, binfmt-support won't work.
You have two options
Use jPortable together with jPortable Launcher
jPortable Launcher allows you to easily run Java JARs from your PortableApps.com-enabled device with the jPortable portable Java Runtime Environment installed.
To use this, visit PortableApps.com and search for jPortable . A list of result should come up and then select the runtime environment and the launcher (links above). Then download both of them, and install per directions. A folder will be created where the downloaded files were run from. Inside one of them will be "JavaPortableLauncher.exe". If you launch it, you should be able to locate and open a jar file with the application.

(or)
- Download and extract the Windows x86 tar.gz version and start your .JAR file from commmand line:
start C:\Java\bin\javaw.exe -jar C:\myfolder\myprogram.jar
I remember that severel years ago you could download Java, unzip it, put it somewhere in a folder, and by pointing to the java executable in that folder you could run java. I don't know how it works today with the current versions, but I wouldn't be surprised if it still could work like that. Don't have Windows here, so can't test it, but you can download a zip (or tar.gz) file, unzip that and than work from there. If you can't unzip gz files, download and install 7-zip.
This won't install it like you normally do, so no update alerts etc, no browser integration, no system variables, but you need something to run that code, and this is the least I think.
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
Download one of the tar.gz versions.
No it can't. However, clients do not require the JDK, the JRE would do. You can make your jar declare its own main class and have users double click it normally like an exe file or create a bat file in Windows.
It requires a JRE instance to be installed on the host machine. This is because JAR files are actually executed via a command line like (in Windows):
java -jar ...
This means that somewhere on your system the java.exe executable should be reachable, either by including its folder in the PATH (Windows) or replacing java with its full path.
Also, most likely you will need to have all the runtime Java libraries to be hosted on the system, as the JAR file containing the application you want to run is not supposed to contain all the Java API libraries. They are also part of the JRE package.
My explanation is tied to Windows for the sake of examples, but it can be extended to any OS.
+ S (Windows logo key+S).