Java Help... (1 Viewer)

tripoli

Well-Known Member
Joined
Sep 27, 2004
Messages
2,154
Just started a postgrad in IT. One of the modules i'm doin is Java. Anyone know how I can write java code and run the same code on my Apple Powerbook?

Can I download a free program like or how does it work?

Appreciate the help.

B
 
Off the top of my head (my iBook is at home so not sure), if you're running OS X you should have an install for developer tools on one of your os install cds/dvds. This has things like XCode a nice IDE thingy from apple and things like c++ compilers and the apple version of the jdk. Might be worth looking at. Eclipse is a bit much at first, but it's pretty nifty once you get used to it and as long as your machine can run it at a decent pace :)
 
cool, must check that out, eclipse is very complaex alright.
cheers dude.

ook said:
Off the top of my head (my iBook is at home so not sure), if you're running OS X you should have an install for developer tools on one of your os install cds/dvds. This has things like XCode a nice IDE thingy from apple and things like c++ compilers and the apple version of the jdk. Might be worth looking at. Eclipse is a bit much at first, but it's pretty nifty once you get used to it and as long as your machine can run it at a decent pace :)
 
ok ook this is working for me at all. i didn't get Xcode with my powerbook. the oul boy got it with his iMac which is older than my machine. loaded it up but can't figure out exactly what applications i am looking for.

basically, i want to write basic code, compile it like the javac prompt in windows and then run it with java AddNumbers for example.

any ideas how i can do this easily. can i write the code in a word processor and save it as for example AddNumbers.java.

Any help greatly appreciated.

Thanking you in advance

b
 
tripoli said:
Any help greatly appreciated.

Thanking you in advance

b

eh, I just got home from work, (it's been a bit mental recently :() so I'm really not in the mood to fire up xcode now.

I will have a look at xcode either tomorrow evening or over the weekend and get back to you.

(I've only ever used xcode for messing with objective c crap)
 
i use Eclipse its open source so is regularily updated, plus nice gui as well. Xcode can be too clogged at times but is worth a look to
 
cheers;)
ook said:
eh, I just got home from work, (it's been a bit mental recently :() so I'm really not in the mood to fire up xcode now.

I will have a look at xcode either tomorrow evening or over the weekend and get back to you.

(I've only ever used xcode for messing with objective c crap)
 
Right, here goes...

The version of XCode I have is 1.1, the version that comes on the OS X 10.3 install CDs somewhere.

I opened up XCode (Macintosh HD -> Developer -> Applications -> XCode)

From the XCode File menu I selected New Project.

There are *alot* of different project types, if you scroll down the list you should find Java project types. There are a bunch of different project types, mostly either for GUI or Server side stuff, the simplest Command Line project sample is called "Java Tool". It's a command line program wrapped up in a .jar file which is the standard Java way of distributing an application bundle.

Give it a project name, I picked Numbers as the name and put it in ~/code/java/Numbers/ (the ~ stands for my home directory, it's a unix thing).

When you click finish on the Project setup dialog it brings up the Numbers directory which has some files to do with the .jar thing (ignore it) and Numbers.java.

Double click on Numbers.java and it will bring up a hello world class.
Write your code, when you're ready to compile it click the build button on top of the code window.

When you're ready to test it press the build and go button and it will bring up a new window with your program executing in it.

It has a debugger included so you can step through code etc. but that's for another day.

You should be able to access Java documentation from the XCode help menu "Show Documentation Window" option.

If you're really new to Java I found the Java Tutorial (http://java.sun.com/docs/books/tutorial/) to be very helpful when I was learning Java in uni.

Hopefully that's enough to get you started.

If you decide you like XCode and have to do a lot of Java dev work, it's probably worth registering on the apple developer site, it's free for basic membership, and download the latest xcode version. I think it's 2. something now.

If you want to give Eclipse a shot and are a bit lost I'll write something similar up for Eclipse some day. I use Eclipse a reasonable amount in work (although not for java work), but I don't have a copy on my laptop so can't do it now.
 
Jeez fair play ook, just in from work now so i'll give it the lash tom morn. Thanks for the advice, i'll let you know how i get on.

Cheers

ook said:
Right, here goes...

The version of XCode I have is 1.1, the version that comes on the OS X 10.3 install CDs somewhere.

I opened up XCode (Macintosh HD -> Developer -> Applications -> XCode)

From the XCode File menu I selected New Project.

There are *alot* of different project types, if you scroll down the list you should find Java project types. There are a bunch of different project types, mostly either for GUI or Server side stuff, the simplest Command Line project sample is called "Java Tool". It's a command line program wrapped up in a .jar file which is the standard Java way of distributing an application bundle.

Give it a project name, I picked Numbers as the name and put it in ~/code/java/Numbers/ (the ~ stands for my home directory, it's a unix thing).

When you click finish on the Project setup dialog it brings up the Numbers directory which has some files to do with the .jar thing (ignore it) and Numbers.java.

Double click on Numbers.java and it will bring up a hello world class.
Write your code, when you're ready to compile it click the build button on top of the code window.

When you're ready to test it press the build and go button and it will bring up a new window with your program executing in it.

It has a debugger included so you can step through code etc. but that's for another day.

You should be able to access Java documentation from the XCode help menu "Show Documentation Window" option.

If you're really new to Java I found the Java Tutorial (http://java.sun.com/docs/books/tutorial/) to be very helpful when I was learning Java in uni.

Hopefully that's enough to get you started.

If you decide you like XCode and have to do a lot of Java dev work, it's probably worth registering on the apple developer site, it's free for basic membership, and download the latest xcode version. I think it's 2. something now.

If you want to give Eclipse a shot and are a bit lost I'll write something similar up for Eclipse some day. I use Eclipse a reasonable amount in work (although not for java work), but I don't have a copy on my laptop so can't do it now.
 
right, ook, here goes... (now i have 1.0 if that makes any difference)

ook said:
Right, here goes...
I opened up XCode (Macintosh HD -> Developer -> Applications -> XCode)

From the XCode File menu I selected New Project.

Give it a project name, I picked Numbers as the name and put it in ~/code/java/Numbers/ (the ~ stands for my home directory, it's a unix thing).

When you click finish on the Project setup dialog it brings up the Numbers directory which has some files to do with the .jar thing (ignore it) and Numbers.java.
up to here is fine but when i press finish i get an error message:

File: pbxinterface/Wizards.subproj/PBXWizardPanel.m
Line: 275
Object: <PBXWizardPanel:0x04d0b560>
Method: beginWizard:modalForWindow:modalDelegate:didEndSelector:contextInfo:

already running modal


i press ok then and i have no window or interface with xCode so i don't see "hello world class"

sorry for annoyin ya but any ideas?
 
Bugger, haven't a clue. I can burn you a copy of a newer version of XCode sometime, will give you a PM when I get a chance to download and burn 2.0. Otherwise give Eclipse a shot??
 
ook said:
Bugger, haven't a clue. I can burn you a copy of a newer version of XCode sometime, will give you a PM when I get a chance to download and burn 2.0. Otherwise give Eclipse a shot??

just after finding the most basic program/environment ever on versiontracker, it's a freeware program called "sugar". very basic but i'm gonna just use it for the moment, might get a copy of xCode off you at a leter date. thanks again for all your efforts, much appreciated.
 
Hey I don't really know what the story on the Mac is but ..... surely you could just use a text editor of some kind and compile and run from the command line? Those development environments can often be more trouble than they are worth, particularly when you are just getting started ....
 

Users who are viewing this thread

Activity
So far there's no one here
Old Thread: Hello . There have been no replies in this thread for 365 days.
Content in this thread may no longer be relevant.
Perhaps it would be better to start a new thread instead.

21 Day Calendar

Darsombra (Kosmische Drone Prog)(US)
Anseo
18 Camden Street Lower, Saint Kevin's, Dublin, Ireland
Gig For Gaza w/ ØXN, Junior Brother, Pretty Happy & Mohammad Syfkhan
Vicar Street
58-59 Thomas St, The Liberties, Dublin 8, Ireland

Support thumped.com

Support thumped.com and upgrade your account

Upgrade your account now to disable all ads...

Upgrade now

Latest threads

Latest Activity

Loading…
Back
Top