This question already has answers here:
How to run a JAR file
(12 answers)
Closed 6 years ago.
i have downloaded a school management system v1.0 it was a zip file and when i extracted the file it has some lib file and .jar file so how can i run it i don't know should i install jre to run that file or will it run in wamp server or some other software i am completely lost and haven't found any solution so far if you want the link to the file i can give that but please help me with this software i want to seriously run this application https://sourceforge.net/projects/schoolmanagements/?source=directory
this is the link to file which i am trying to please help me to run this
First, check if you have Java/JRE installed.
Open your command line/terminal tool and input:
java -version
If you don't see version (but see standard for your OS message like "program is not found") - install JRE (select your platform, download and install).
When Java is ready, open your command line/terminal tool again, and navigate to your un-archived School Management System folder (it is the folder, there SchoolMV0.1.jar resides). And run this:
java -jar SchoolMV0.1.jar
Good luck!
Related
Environment: Windows 11
Problem: cannot open .jar file(the MARS assembly language simulator)
Hello, I am currently trying to install the MARS assembly language simulator. It is a .jar file so I downloaded java to open it. However, I still can't open the file even with java downloaded.
I checked if java was installed using my cmd:
Command prompt showing java successfully installed
I tried double-clicking it did not work. So I right-clicked it to open with other apps. But I did not see java in the given options.
Cannot find the java option to open the file
Thank you so much for helping!
Use your prompt
CD into the directory with the jar
then execute
java -jar Mars.jar
...any more troubles , open file properties tab with right click on the jar and check permissions to execute the file.
Installing Java usually means installing a JVM, which is a Java Virtual Machine. You won't be able to launch files from a Windows context menu like this, because "Java" is not a program that opens files.
Instead you need to:
Either a terminal and call javaw.exe with the parameters -jar and your .jar-file. E.g.:
C:\your\java\binaries\javaw.exe -jar -SomeJarFile.jar
Or add the Java installation to your environment variables, then you can call javaw.exe without providing some specific path
This question already has answers here:
Can't execute jar- file: "no main manifest attribute"
(43 answers)
Closed 1 year ago.
I'm new to Java, so I followed this tutorial to learn how to make a Modded Minecraft server. But, in the tutorial, it isn't shown how to run the .jar file as a server, on my own PC. When I try the CMD command java -Xmx1024M -Xms1024M -jar jarfile.jar, I get this error:
no main manifest attribute, in jarfile.jar
Is there any way that I can run a server from the .jar file? Thank you in advance!
What the video is about is called a plugin, not a server or modification.
You create a .jar plugin that needs to be placed in the plugins folder in the server directory.
The plugin will be loaded during the server startup process, so it does not require a separate launch.
Is it possible to create a executable jar file coded in java12 while java8 is still installed?
We use java8 in university but privatly im coding in 12 and so i need to find a way to run a private coded program through a jar file (created with artifacts through intellij) but still keep the java8 installment for university.
i tried this command
start javaw -jar jogurtLaunch.jar
and i tried rightclick and 'open with' and using the java12 exe (both java.exe and javaw.exe), but nothing happens except for the windows cmd prompt popping up for a few milliseconds in case of the exe and a jvm error ('Error: A JNI error has occurred, please check your installation and try again') popping up in case of the command.
Also i'd prefer a solution that is usable on all computers and not just for java12 development pcs.
Is there a way or do i have to code it in java8?
This question already has answers here:
Running JAR file on Windows
(26 answers)
Closed 2 years ago.
Running a .jar file in a command line works fine, but i am not able to run any .jar file by double clicking on my Windows 7 (64). It seems nothing happens after the double click
I set the path JRE path in my regedit HKEY_CLASSES_ROOT with JRE path but still its not running.
Any Solutions for this?
If you have a .jar file called Example.jar, follow these steps:
Open a notepad.exe
Write : java -jar Example.jar
Save it with the extension .bat
Copy it to the directory which has the .jar file
Double click the .bat file which will run your .jar file
See this article for a more detailed explanation of the above steps.
Okay so I have been coding a game for a while now and I am hoping to release its alpha just one problem. I don't know how to export it and run it. Please note that all my code works fine. So when I export it I export it as a Runnable jar file once I do so I set it and have tried both exporting it as .jar and .exe. Once I exported it I tested it by clicking the resulting file but it doesn't open the application but rather it opens it in eclipse encoded. Please help I may just be an idiot.
you have to try to launch it with:
java -jar yourrunnable.jar
If you plan to run on windows and you want a .exe file, try to check this SO question: How can I convert my Java program to an .exe file?
or if you want to target a mac, you can have a check here:
http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html
Basically any platform you target you have some customization in order to achieve a seamless run. Anyway the most cross platform solution is the Java -jar way.
I had the same problem with .jar files not opening on a double click. It turned out that I had two versions of Java installed (Java 6 and 7). Uninstalling Java 6 from Control Panel-> Uninstall a Program was what finally allowed .jar files to open on a double click without using the command window.
What is listed in right-click-> Open With ? Is some other program listed as the default program ? Is a Java Runtime listed ? If a Java Runtime is listed, you can open with it, and make it the default program to run with.
Right Click -> Properties -> Change -> C:\Program Files\Java\jre7\bin\javaw.exe
For Java 8 use below
java.exe -jar myFile.jar