Run Keygen.Jar
OK, so I can't run Java executable files of any sort on my Windows 7 PC. The one in particular I'm trying to use is the Forge installer for Minecraft. Normally, an installer window should open when I double click the file. I have Java installed and I set it to open with Java (TM) SE Binary but all that does is make the command prompt window open and then close again instantly. I have tried using the command method to open it but then it comes up with the error saying Error:
I have downloaded the JDK file because I heard that was something I needed, but I'm not sure where to put it so it will do what it is supposed to.
Was there something else I needed to download or is there something wrong with the version of Java I'm using (I checked and it's at the latest update). By the way I have a Windows 7 64 bit if that helps.
1 Answer
OK, here are some things to check:
Make sure to run the command java -jar [filename].jar Replace [filename] with whatever the name of the jar file you want to open is. You have to be careful that you add the .jar at the end, or it will produce the error you said.
On the Forge download page, did you download the Latest version or the Recommended version? If you installed the latest, you might want to give the recommended version a shot.
Another thing on the side is that the JDK (Java Development Kit) should not be needed here, just the JRE (Java Runtime Environment). Make sure you have that.
Not the answer you're looking for? Browse other questions tagged minecrafttechnical-issues or ask your own question.
So you got an executable jar and you are wondering how to run it! . In this tutorial we define the different ways to run an executable jar through the windows command line. In case you don’t know what’s an executable jar, refer to our previous tutorial about creating executable jars in java.
Throughout this tutorial, we consider that you’ve already installed java on your machine, and you set up properly the java environment variables.
1. Jars with predefined main class
Every executable jar should hold a MANIFEST.MF file which holds important information about the jar itself, if you’re lucky enough you get a jar with a predefined main class in MANIFEST.MF
In order to check if the main class is already defined:
extract your jar using any archive tool e.g. winrar, 7-zip => open MANIFEST.MF fileunder META-INF => then check whether there exists an attribute called Main-Class and is set properly.
El mito vegetariano pdf. That includes scrumptious gluten-free creations, a lot of which might be made low in sugar, dairy-free or with all-vegan parts, it presents a deal with for the senses that totally a person can get pleasure from - it doesn't matter what their nutritional necessities.
In order to run the jar, just type the following command in the windows console:
e.g.
2. Jars without predefined main class
Some developers forget to define the main class inside the manifest file while creating the executable jar, when you get this kind of jar and try to run the above command, you get an error message like : ‘no main manifest attrbute’.
In order to run this kind of jar, you must know the full path of the main class and use the following command:
java-cp<jar-file-name-with-extension><full-path-of-main-class> |
Quite imposing 2. e.g.
Samsung guru music 2 games download. Download cricket games for the Samsung Guru Music 2. These games are free to download and install. The cricket free games support java jar mobiles. Samsung Guru Music 2 games free download for your mobile. Samsung Guru Music 2 java game download and thousands of latest free games for. Download free classic games for your Samsung Guru Music 2 smartphone. Free java jar games for your mobile fast and easy downloads. Download free games for your Samsung Guru Music 2 smartphone. Free java jar games for your mobile fast and easy downloads. Download free adventure games for your Samsung Guru Music 2 smartphone. Free java jar games for your mobile fast and easy downloads.
java-cp executable.jar com.programmer.gate.HelloWorld |
If you don’t want to write the path of the main class each time you run the jar, you can update the manifest file of the jar and add your main class there. Refer to this article on how to make an existing jar file executable.
3. Dependable jars
A jar is dependable if it can’t run independently without the existence of other jars, in order to run this kind of jar you must explicitly specify its classpath either through command line or via manifest file.
Suppose that you have a folder named lib which exists inside the project beside META-INF and holds third-party libraries used by your application, your jar wouldn’t work without including these dependencies.
Option 1: Specify the dependencies while running the jar in the command line:
java-cp<name-of-jar-with-extension>;<path-of-dependency-folder>/*;.<path-of-main-class> |
e.g.
java-cp executable.jar;lib/*;.com.programmer.gate.HelloWorld |
Option 2: Specify the classpath of the jar in the manifest file:
Normally the developers who create the jar should specify its dependencies inside the manifest, but in case they forgot and you don’t have other way to run the jar, just add the following attribute just before the main class attribute in MANIFEST.MF:
then use the typical command:
4. Unsupported major.minor error
In some cases, you got ‘Unsupported major.minor version’ error when running an executable jar. This error means that the version of the JDK used for developing the jar is greater than the JRE version currently used to run it. Beware that java is backward compatible, so always make sure that the JRE version of running environment is greater than or equal to the JDK version used for development.
Comments are closed.