This discussion is archived
1434 Views 9 Replies Latest reply: Oct 4, 2007 8:33 PM by David Bixler
Currently Being ModeratedOct 2, 2007 6:21 AM (in response to David Bixler)See my notes here:
These worksheets will take you through the process of using Xcode to create Java programs.
The comment on not using a JDK is nonsensical. You MUST use a JDK to create a Java program! It probably means to say that you should not use an IDE. If so, that's also nonsense.
BobMac Book, Mac OS X (10.4.8)
Currently Being ModeratedOct 2, 2007 6:25 AM (in response to David Bixler)
David Bixler wrote:
I bought a book on java and it says I should not use a JDK when first learning java.
I think they mean IDE, considering that Java is the JDK. And I agree with that idea, not just for Java, but for any language.
How do you go about setting up the computer to use terminal to write and compile a java program?
There isn't anything to setup. Just run Terminal and type "vi hello.java" or "nano hello.java". To compile, type "javac hello.java".
I know that’s pretty big question. I just need a link to some info on how to get started using terminal and java.
That is not necessarily a big question, just fundamental. Try Google. It becomes second nature after a couple of decades so I don't really know where to tell you to look. People do tend to have a big list of links, hopefully they can contribute some.
If I use a text editor how do I set up a path to it using javac?
It should already be in your path.
Where can I find or link to this kind of info?
Try Google. People like it. You should find many pages similar to this.MacBook, Mac OS X (10.4.10), 1.83Ghz/2GB Ram/80 HD +iMac G4 800
Currently Being ModeratedOct 2, 2007 8:23 AM (in response to David Bixler)Running java is easy -
[dranta:~/tests] dir% javac testcpu.java
[dranta:~/tests] dir% java testcpu
will compile and run your simple programs.
[dranta:~/tests] dir% which javac
[dranta:~/tests] dir% which java
shows links to javac and java in /usr/bin
[dranta:~/tests] dir% ls -l /usr/bin/javac
lrwxr-xr-x 1 root wheel 78 Mar 5 2007 /usr/bin/javac -> /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Commands/javacG4 Dual 1.25
Currently Being ModeratedOct 3, 2007 9:00 PM (in response to etresoft)Thanks for the info. It may take me a few days to get to it. I have to put my computer back together.
I was messing around in terminal and was trying to change my short name in system preferences and lost a bunch of stuff like all my mail.
Note to self: Don't do that again.
I also found a good description and some basic unix commands in Tiger Missing ManualMacBook Pro, Mac OS X (10.4.10)
Currently Being ModeratedOct 4, 2007 1:58 PM (in response to David Bixler)Before you do too much work, maybe create a new thread and explain what you did. It may be easy to fix. If you know what you're doing, you can change your short name pretty easily.MacBook, Mac OS X (10.4.10), 1.83Ghz/2GB Ram/80 HD +iMac G4 800
Currently Being ModeratedOct 4, 2007 3:28 PM (in response to etresoft)I thought it was going to be simple. Most things are simple if you know what your doing.
All I did was highlight and change my name under my house icon in the users folder.
When I logged out and then back in it put all my stuff in a different folder under users, wipped out my mail and a bunch of other stuff and my short name did not change. That was the bad part.
Good Idea, I will start another thread.MacBook Pro, Mac OS X (10.4.10)
Currently Being ModeratedOct 4, 2007 5:59 PM (in response to David Bixler)All your stuff is still there. Go into the /Users directory and rename the folder with your old name to be "old.broken". Then, rename the folder with your new name to be the same as your old name. Log out and log back in. With any luck, you will be back in business. Delete that "old.broken" folder when everything is working properly.MacBook, Mac OS X (10.4.10), 1.83Ghz/2GB Ram/80 HD +iMac G4 800
Currently Being ModeratedOct 4, 2007 8:01 PM (in response to etresoft)I think I'll put it back togeather the old fasion way, a few folders at a time.
Like I said my old shortname( the original folder ) will not change. It just dumps all my files into a new folder with a new name .
I stll have my little house there with my orginal name under it and in terminal my shortname is still long.
I did how ever finally figure out how to navigate through the command line to a folder and then compile and run a java app. All is not lost yet.Dual 1.25 G4, Mac OS X (10.4.10)
Currently Being ModeratedOct 4, 2007 8:33 PM (in response to David Bixler)I did have to use terminal to navigate to a folder that held my text files for the java program I was building.
I dug out my Missing Manual for Tiger and used the chapter on terminal to figure out the directory thing.
Easy if you know what your doing.
Still got a long was to go but I'm now past start.