Compile and run java on Mac via Terminal
Uploader Comments (ratulcool1)
All Comments (40)
-
Do I have to install a software on my Mac to work with Java programming? or it's already installed with my Mac?
I wanna make sure, thanks
-
@Thefuzzyman83 when you save select plain text from the drop down menu at the bottom of the pane that appears, then change the .txt to .java
-
I copied your diamond file on TextEdit but when i try to save it, it only allows me to save it as a .rtf when i try to change the extension to .java. PLEASE HELP
-
thanks for the help!
-
easy on the Enter key.. hehe!
-
many thanks to you.
-
The osx operating system compiles just like any other program. You don't need any extra flags for a simple program like this. javac hello.java will still work. Thanks for posting the vid.
-
Thank you so much! Other videos didn't help at all /: this certainly did, and it was exactly what i was looking for(:
-
whats cd? my .java is not on my pics folder... and copying the path doesnt work?
what if i have various layers?
if i want to make an extra folder inside 'Documents' called 'Java'.
and i want to store all my programs inside that 'java' folder' only.
then how do we define the path in terminal?
beingRaghu 11 months ago 2
@beingRaghu no probs just follow this command line:
cd Documents
cd Java
then access ur file
ratulcool1 11 months ago
@ratulcool1 k thanks.. it worked fine.but when i wrote the java applet code.
ran it on terminal as u said.but still the msg appears saying "Exception in thread "main" java.lang.NoSuchMethodError:main"
.. ???
do i need to install any additional softwares or something to run AWT applets on mac??
beingRaghu 11 months ago
@beingRaghu hmmm...i really havent looked into using mac terminal for java applets....u can try this program called Blue J for mac...its a very simple and useful compiler and im very sure it can compile and run applets...
ratulcool1 11 months ago
is the code different from that of windows? cuz the PSVM (main definition) ends with (string args[]) , I am a beginner, so tell me if I am wrong
inditech96 1 year ago
@inditech96 no dont worry java is universal and the code doesn't change. Yes your right (String args[]) is used but it is not really required when using such a compiler :D
ratulcool1 1 year ago