Java compiling on a mac

Could Someone PLEASE explain with a good amount of detail how to compile a program through terminal on a mac. Whatever I try I can't get it to work.
[156 byte] By [crichardson@1a] at [2007-11-27 9:04:32]
# 1

> Could Someone PLEASE explain with a good amount of

> detail how to compile a program through terminal on a

> mac. Whatever I try I can't get it to work.

could someone please ask with a good amount of detail the specifics of their question? "can't get it to work" doesn't tell anyone much.

petes1234a at 2007-7-12 21:37:50 > top of Java-index,Java Essentials,New To Java...
# 2
one might just say that one has no idea how to use the javac command in terminal at all, and one would just like a little bit of help
crichardson@1a at 2007-7-12 21:37:50 > top of Java-index,Java Essentials,New To Java...
# 3

> one might just say that one has no idea how to use

> the javac command in terminal at all, and one would

> just like a little bit of help

What have you tried to do? What terminal are you using? (I've never used a mac personally, but I understand they ship with a *NIX shell, right?)

Navy_Codera at 2007-7-12 21:37:50 > top of Java-index,Java Essentials,New To Java...
# 4
Your Mac should come shipped with a JDK, so all you need to do is Open up terminal, cd into the directory with your .java file, and javac myjavafile.javawhat is the problem you are having?
ErikSilkensena at 2007-7-12 21:37:50 > top of Java-index,Java Essentials,New To Java...
# 5

> > one might just say that one has no idea how to use

> > the javac command in terminal at all, and one

> would

> > just like a little bit of help

>

> What have you tried to do? What terminal are you

> using? (I've never used a mac personally, but I

> understand they ship with a *NIX shell, right?)

It's based on the BSD environment, with a MACH based kernel (although it's not a micro kernel, despite the fact that many will claim it is - probably because MACH is best known as a microkernel)... The finder is a *nix shell, and can be swapped out at startup by changing a plist setting ;) but it also comes with a number of "traditional" shells, bash, sh, tcsh that I know off, of the top of my head... bash being the default for the terminal.app

http://www.apple.com/macosx/features/unix/

macrules2a at 2007-7-12 21:37:50 > top of Java-index,Java Essentials,New To Java...
# 6
So what i did was type in "javac myfile.java" into the terminalThen i wait like 2 seconds and it says there is one error. But there isn't an error b/c i downloaded the stuff from a website for a book that I have.
crichardson@1a at 2007-7-12 21:37:50 > top of Java-index,Java Essentials,New To Java...
# 7
Just copy and paste the error...
macrules2a at 2007-7-12 21:37:50 > top of Java-index,Java Essentials,New To Java...
# 8

> So what i did was type in "javac myfile.java" into

> the terminal

> Then i wait like 2 seconds and it says there is one

> error. But there isn't an error b/c i downloaded the

> stuff from a website for a book that I have.

And I have to add that blind faith in something from a "website" for a "book" isn't a good thing.

macrules2a at 2007-7-12 21:37:50 > top of Java-index,Java Essentials,New To Java...