#What should I do if the java file cannot be run?
Solution to the problem that the java file cannot run:
1. After installing the Java virtual machine, open "My Computer" on the desktop and click the menu " Tools"→"Folder Options";
2. Switch to the "File Types" tab in the "Folder Options" settings window. Check to see if the file extension has .jar. If so, select the .jar file and click the "Change" button. If there is no .jar, then click the "New" button to create a new .jar extension;
3. Click the "Advanced" button, Click the "New" button in the "Edit File Type" window that appears. In the pop-up "New Operation" settings window, name the operation "open" and the application used to perform the operation is "C:\Program Files\Java" \jre7\bin\javaw.exe" -jar "%1" (Please do not fill in the quotation marks. Please fill in the specific JVM folder path according to the actual situation. It is usually located in C:\Program Files\Java);
4. After the settings are completed, exit, save and exit.
Recommended tutorial: "JAVA Video Tutorial"
The above is the detailed content of What should I do if the java file cannot be run?. For more information, please follow other related articles on the PHP Chinese website!