PDA

View Full Version : Java




MeanD3feat
Feb 5, 2005, 07:02 PM
OK previously I was working with a PC using textpad for java, but now I don't have a PC and I would like to continue learning Java. I understand that somewhere in 10.3 there is a Java "thing" (in case you haven't noticed the classes haven't really sunk in but I have the literature so I would now like to self teach) where I can write my Hello World program :rolleyes: , but I can't find it!
Yes I realise this is a VERY basic question, but everyone has to start somewhere ;)
Any help would be appreciated :D
Also is where I do the typing compile etc the console? :confused:
Thanks



daveL
Feb 5, 2005, 07:10 PM
Did you install the Xcode developer tools? You'll need to to get the Java SDK. You should either have an Xcode CD or you can download it from the Apple developer site. Make sure you get the latest version, as it needs to match up with the Java runtime that's already installed as part of the base OS.

daveL
Feb 5, 2005, 07:12 PM
Hey! I finally made it from 6502 to 65816!

MeanD3feat
Feb 5, 2005, 07:39 PM
OK it was all on the Hard Disk waiting to be installed, just for the record, OS X takes much longer to boot now. Before when the silver apple logo and progress bar came up I would see the bar reach two thirds and no writing was displayed, then I would get the desktop and be ready to go. Now I have to watch the whole bar fill and wait a few seconds after the desktop appears before I can do anything-not a problem (I hope) but just thought I would mention it!

OK like I said, it is installed now and I have a folder called developer. Where do I go from here? :confused:

Also
Hey! I finally made it from 6502 to 65816!

Congrats, not quite sure what that is all about, but you seem pleased :)

dejo
Feb 5, 2005, 07:41 PM
OK like I said, it is installed now and I have a folder called developer. Where do I go from here?

Try heading here: http://developer.apple.com/

dejo
Feb 5, 2005, 07:44 PM
Did you install the Xcode developer tools? You'll need to to get the Java SDK. You should either have an Xcode CD or you can download it from the Apple developer site. Make sure you get the latest version, as it needs to match up with the Java runtime that's already installed as part of the base OS.

Java SDK is built into Mac OS X, along with the rest of J2SE. You don't HAVE to install Xcode to get started, if you don't want to.

MeanD3feat
Feb 5, 2005, 07:46 PM
Java SDK is built into Mac OS X, along with the rest of J2SE. You don't HAVE to install Xcode to get started, if you don't want to.
Err too late! :(

MeanD3feat
Feb 5, 2005, 07:51 PM
Can anyone point me in the direction of what i think is called the console? I think that is what I am looking for, the screen where I input the code and then see if it compiles, and then run. Like I said I used textpad previously, and found that good because it colour coded everything and inserted tabs for me.
So far I have installed Xcode and have had a look at the link posted above but it appears to be about 0S 8.
Thanks for all the help so far, this has to be the fastest responding forum I have ever been a member of, pure class :D

mms
Feb 5, 2005, 10:21 PM
/Applications/Utilities/Terminal.app

MeanD3feat
Feb 5, 2005, 10:48 PM
I can see terminal, but I have no idea what to do next. Is there any app on the Mac similar to textpad? I am at the stage of rolling around on my back as far as java is concerned; I'll hopefully be crawling soon, but walking is a long way off, and you know what they say, you've got to crawl before you can walk!
So any instructions really do have to be basic, honestly the simpler the better-I wont be offended! :D

EDIT: Like TextMate (http://www.macromates.com/)

Is there a way after writing a java program (such as hello world :p ) with textmate to get it to compile and run? I can't find an option anywhere! I know with TextPad you had to install a plugin, but I wouldn't know where to start with this program.

MeanD3feat
Feb 5, 2005, 11:26 PM
I'm currently downloading Netbeans to see if that is what I'm after. In the meantime, thanks for all the help and I'll let you know how I get on.

Cybernanga
Feb 5, 2005, 11:29 PM
open the Developer folder, in there, open the Applications folder then open Xcode
("/Developer/Applications/Xcode")

Then from the file menu, choose new project, and scroll down and you'll see options for JAVA programming.

Enjoy.

Poeben
Feb 5, 2005, 11:42 PM
Proabaly not exactly what you are looking for, but when I did my "Hello world" I did it all from Terminal. You should learn two things:

1. vi -- vi is a text editor, but read the man page first if you have never used it.

2. you can compile right from the shell prompt. The command is 'javac' Also worth a man page reading.

That should be enough to make you just a bit dangerous. Some googleing should help you out too.

daveL
Feb 8, 2005, 03:18 PM
Java SDK is built into Mac OS X, along with the rest of J2SE. You don't HAVE to install Xcode to get started, if you don't want to.
My bad, then. I always install Xcode when I install the OS, so I have no way of telling when the SDK is installed. I thought the basic OS install only gave you the JRE. It seems a bit odd to me to install the Java SDK, but no other development tools. Why should Java be "special"?

devman
Feb 9, 2005, 05:55 AM
I'm currently downloading Netbeans to see if that is what I'm after. In the meantime, thanks for all the help and I'll let you know how I get on.

You really don't need it but if you want to go that route you should look at eclipse also. Xcode 1.5 is the native IDE and it supports Java development (earlier versions of Xcode do as well, but 1.5 adds what many consider the essentials).

MeanD3feat
Feb 9, 2005, 08:50 AM
ok, but i actually don't know what to do with Xcode once it is running! I can type obviously, but that is it really. I dont get indents or colours and i wouldn't know how to compile or run anything. Though to be fair the problem here is between the keyboard and the mouse! ;)

mkrishnan
Feb 9, 2005, 09:23 AM
1. vi -- vi is a text editor, but read the man page first if you have never used it.

Or consider using TextEdit (in the applications folder somewhere) or pico ... vi is good but not necessarily for the faint of heart. ;)

Mr_Ed
Feb 9, 2005, 10:03 AM
You really don't need it but if you want to go that route you should look at eclipse also. Xcode 1.5 is the native IDE and it supports Java development (earlier versions of Xcode do as well, but 1.5 adds what many consider the essentials).
Yeah, Eclipse (http://www.eclipse.org) does work nicely in OS X and it might be a good environment if you are learning Java. It might seem a bit cumbersome at first (feature rich) but once you figure out the basics (where to go to build, run, configure runtime options/classpaths for your programs, etc.) you should be able to program and run pretty quickly.

devman
Feb 10, 2005, 06:07 AM
ok, but i actually don't know what to do with Xcode once it is running! I can type obviously, but that is it really. I dont get indents or colours and i wouldn't know how to compile or run anything. Though to be fair the problem here is between the keyboard and the mouse! ;)

Make sure it's Xcode 1.5. I'm pretty sure that's the version that added Java syntax awareness, etc. to the editor.

If not that, then go get a book. There's several good OS X programming books that cover Xcode. There's also a Java for OS X book from O'Reilly. Or do a google on java and xcode. Here's a first page hit I got - scroll down and you'll get a very simple walkthrough to get you started.

http://moss.utsa.edu/MAX/CSHomework.html