Download presentation
Presentation is loading. Please wait.
1
How to Compile Java in Windows
2
click start then run
3
type cmd into dialog
4
Once you have saved the Java files from the course web site to some folder, type cd Folder_Path_Of_Java_Files into the shell window. E.g if the files are in H:\Bill then I type cd H:\Bill This is a shell window
5
Note, you can paste the path name from the Windows explorer that you use to see your folders. Right Mouse Click inside the shell window pastes from the clipboard.
6
To compile a file MyJavaFile.java type into the shell window: javac MyJavaFile.java Then to run the program with the Java interpreter type: java MyJavaFile NOTE: There is no file extension, just the name of the application we have created. When you want to stop the java program type C-c that is hold down the control key and then the ‘c’ key.
7
Sometimes when you make changes to the Java source files the java compiler does not always notice when you recompile the program. If you have changed a program and it looks like there is no change when you run it try deleting all the ‘.class’ files in the folder. Then recompile and run the program again. You can do this by selecting them and deleting them in windows explorer
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.