Run Java program without edit mode in Windows 8,8.1,10
MS-Dos editor(edit.exe) is not present in Modern 64 bit windows. The only option is notepad.
So in order to edit or run java programs perform in the following way.
1. Download jdk 1.7.0_25 x64 bit(for x64 bit windows only)
2. Install jdk
3. Right click on My Computer ->Click properties ->Advance System settings ->Environment
Variables ->System Variables ->New ->Variable name: write “Path” without quotes
Variable value: write “C:\Program Files\Java\jdk1.7.0_25\bin” wihout quotes -> Click OK ->OK
**Note:-check your jdk version before writing the variable value…If you have other version of jdk
the Variable value should be changed…..
4.Goto C:\Windows->Right click on System 32 folder->Click Properties->Security->Advance->Click
on “Change” option (writen in blue color) ->Click Advance->Find Now->Select The user you
currently logged in(*if you have more than one user you should logged on to the
administrator first, to check which one is administrator go to “User Accounts”)
5. Press Windows key+R -> type cmd and hit enter ->in thr taskbar right click on the Command
prompt icon ->Click pin to task bar ->close commant prompt
Now again Right click on the Command prompt icon(you have recently pinned)
->Right Click on Command Prompt -> Click Properties->In Shortcut tab write
“%windir%\system32\” (without quotes) in the Start in box-> Click ok
6. Open Command Prompt from Task bar(you have recent pinned command prompt icon in Task
To View Command prompt(CMD) in full sreen Start CMD -> Right Click on Name Bar of CMD->Click Layout -> Increase Window Buffer Size width and height
7. Type “notepad” without quotes.
8. write your java program and save as < Class name.java> (class name refers to the name of the class which you’ve used in your program)
public static void main(String args)
You MUST have to save the above program As: hello.java in “C:\Windows\System32” folder.
** You can create A shortcut to the “System 32” folder in the Desktop for quick access
**To create a shortcut of “System32” goto “C:\Windows” -> Right click on System32 and select Send to->Desktop(create shortcut)
9. Type “javac<space><program name.java>” without quotes (To compile hello.java type javac hello.java )
***if no errors displayed then go to step 10 oterwise type notepad and edit your program again***
10. Type “java<space><program name>” without quotes( As to run hello.java type java hello)
You have successfully Write, Compile and Run a Java Program on ” x64 bit Windows using COMMAND PROMPT”.