Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

geese

macrumors 6502a
Original poster
Oct 23, 2003
525
0
London, UK
I'm in a bit of a pickle!

I have to learn Java for my uni course- not easy when I dont know alot about it. Here we use Borlands JBuilder on Windows to compile code.

But I need to practice at home on my eMac (Panther). I'm struggling with the software. I've tried to download to jBuilder for OS X, but when I try and run it, it just quits out after 10 seconds. I'm sure I've registered the program right and made sure the path its in hasn't got spaces in.

So I looked through the threads and saw jBird recommended. Downloaded it and managed to type in the example code I got from uni (just a program thats prints 'Hello' on the screen). When when it compiles the code, I dont know how to execute it. It just says 'Compile Process Completed'. It worked at UNI, how do i get it to execute!

Could someone pleeese assume that I'm a simple buffoon and give me precise instuctions on what I should do.https://forums.macrumors.com/images/icons/icon11.gif

EDIT: Just realised, its 'JCREATOR' that we use at uni, not JBuilder. oopps.
 

Logik

macrumors 6502a
Apr 24, 2004
616
0
the easiest way to do this is to use xcode for home and jbuilder for school. all you'll need to do is create a blank project and insert the *.java files into the project... then compile... pretty easy stuff really.

A few things about java though.. class files (MyJavaApp.java for example) will need to contain a MyJavaApp class in that file.. it's case sensitive so you can't have myJavaApp or myjavaapp.java and the class name in that file be MyJavaApp ... i recommend checking out Deitel & Deitels book called "Java: How to Program" ... good book, rather expensive. but i fyou want to do java programming.. get it.. great book.

if you have any other questions post here or private message me.

EDIT: you WILL need to install the xcode tools and such for it to even compile on your mac.. that contains the JDK and stuff.. the Runtime doesn't include the java compiler... just the interpreter (virtual machine)
 

abhishekit

macrumors 65816
Nov 6, 2003
1,297
0
akron , ohio
Well IMHO using xcode may not be such a good idea. When I was starting, it was very confusing to me. I use Netbeans instead.
Coming to your question, I have not usd JBuilder, but there must be 'execute' or 'run' somewhere in the menubar. Else, goto the folder in which JBuilder stores the class files by default. See if you have a HelloWorld.class or whatever you named your code.class. Then from the terminal goto that folder . And write 'java Filename'. This would run it.
 

bousozoku

Moderator emeritus
Jun 25, 2002
15,728
1,902
Lard
geese said:
I'm in a bit of a pickle!

I have to learn Java for my uni course- not easy when I dont know alot about it. Here we use Borlands JBuilder on Windows to compile code.

But I need to practice at home on my eMac (Panther). I'm struggling with the software. I've tried to download to jBuilder for OS X, but when I try and run it, it just quits out after 10 seconds. I'm sure I've registered the program right and made sure the path its in hasn't got spaces in.

So I looked through the threads and saw jBird recommended. Downloaded it and managed to type in the example code I got from uni (just a program thats prints 'Hello' on the screen). When when it compiles the code, I dont know how to execute it. It just says 'Compile Process Completed'. It worked at UNI, how do i get it to execute!

Could someone pleeese assume that I'm a simple buffoon and give me precise instuctions on what I should do.https://forums.macrumors.com/images/icons/icon11.gif

EDIT: Just realised, its 'JCREATOR' that we use at uni, not JBuilder. oopps.

If you're really using JBuilder on Mac OS X and it's quitting, you need to make certain that you've followed the instructions in the e-mail they sent you. There is an authorisation file attached to the e-mail that allows JBuilder to continue.
 

cluthz

macrumors 68040
Jun 15, 2004
3,118
4
Norway
Haven't used jBuilder, but this i basic java programming i would use a plain text editor, like textedit, bbedit, subethaedit (my fav.) or emacs.
you can compile in the Terminal >javac filename.java
 

coconn06

macrumors regular
Jun 14, 2003
197
0
King of Prussia, PA
geese said:
I'm in a bit of a pickle!

I have to learn Java for my uni course- not easy when I dont know alot about it. Here we use Borlands JBuilder on Windows to compile code.

But I need to practice at home on my eMac (Panther). I'm struggling with the software. I've tried to download to jBuilder for OS X, but when I try and run it, it just quits out after 10 seconds. I'm sure I've registered the program right and made sure the path its in hasn't got spaces in.

So I looked through the threads and saw jBird recommended. Downloaded it and managed to type in the example code I got from uni (just a program thats prints 'Hello' on the screen). When when it compiles the code, I dont know how to execute it. It just says 'Compile Process Completed'. It worked at UNI, how do i get it to execute!

Could someone pleeese assume that I'm a simple buffoon and give me precise instuctions on what I should do.https://forums.macrumors.com/images/icons/icon11.gif

EDIT: Just realised, its 'JCREATOR' that we use at uni, not JBuilder. oopps.

I'm not sure why you need/want to use software with a GUI to learn Java, but I would suggest just compiling and running your Java code from the Terminal.

To compile: "javac HelloWorld.java"
To run: "java HelloWorld"

That will work in most cases, for your purposes (gets a little more complicated when you start using packages and classpaths)
 

Logik

macrumors 6502a
Apr 24, 2004
616
0
I've not had a single problem with Xcode.. i use it to develop my java apps for my java class as well... eclipse turned me off last time i used it... horrid application. netbeans is another ridiculously nasty app... xcode or terminal for me...
 

geese

macrumors 6502a
Original poster
Oct 23, 2003
525
0
London, UK
thanks!...

I've managed to handle using BlueJ now. Its quite a simple app and will do for now.

That Terminal method sounds like a good idea, shame then I dont know the first thing about the Terminal then! Does look intruiging though.

As for JBuilder, i did follow the instructions and tried to use the autherisation file. No avail. Probably my fault somehow.

Thanks for the help though. I've got a more pressing problem now though, my eMac keeps sleeping randomly! I think I;ve got a 'Friday Afternoon' model. Thats for another thread though.
 

BoneyardBoy

macrumors member
Jun 10, 2004
31
0
Under the sea
hey geese. good luck with learning java. i've only just started a course on it at college and it's a bit grrr at times but i'm managing. just keep practising! :) (i'm using bluej on my mac at home)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.