 |
 |
I've just started my first Java class and...
|
 |
|
 |
|
Forum Regular
Join Date: May 2001
Location: Brisbane
Status:
Offline
|
|
I would love some pointers. I have just had my first lecture in COMP1500 - Introduction to Software Engineering (which is basically just 13 weeks of Java) and I have just one main question at the moment (although you may be hearing from me a lot in the next 13 weeks <img border="0" title="" alt="[Wink]" src="wink.gif" /> )
I use my iBook (500 DVD 384 with OSX) at uni. The requirements for the course are Java JDK 1.3 (which I think comes with OSX?) and they also use another program called Kawa (v3.51a) as a GUI interface for compiling and running etc (I'm really not sure what Kawa does, I'm completely new to all aspects of programming in any language)
The task for the first week is to become comfortable using Kawa to compile .java files to .class, and then run the compiled code. I'm sure this can be done with the developers tools (I have the september 2001 version), I just don't know what to use or how to do it, and I really don't like the idea of having to go into the PC labs at uni to do all my work for this subject.
It would be great if you could let me know how to do all this stuff on my mac, keeping in mind that I know sh*t about programming
Sorry about the long post - any help would be greatly appreciated
|
|
The Duke
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2002
Status:
Offline
|
|
Woah, freaky - I've used the handle Il Duce in the past, and I am doing the exact equivalent unit over here in Perth. So I guess I'd better try and help out  OS X does indeed include the JDK 1.3.1, and all the tools you need. Why your uni is using Kawa I do not know, development of it was discontinued last year. Project Builder (the IDE that comes with the developer tools) is a pretty darn good Java IDE itself, and you can use the standard command-line JDK tools from Terminal. The most important ones to you will be javac and java; javac <filename> compiles a .java file into a .class, and java <classname> runs a class that has a main method. It's hard to help further without more specifics of what you want to know...
|
|
[vash:~] banana% killall killall
Terminated
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
|
|
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: May 2001
Location: Brisbane
Status:
Offline
|
|
Thanks for the replies (to add to your freaky set of circumstances, I grew up in Perth - I lived in applecross for six years before I moved to Brisbane <img border="0" alt="[Skeptical]" title="" src="graemlins/bugeye.gif" /> )
Anyway - back on topic
The reason I ask is that in the first class the lecturer compiled and ran some source code from the command prompt and through Kawa. I tried using terminal and got it to work sorta (I got two errors which he didn't get), and I tried project builder, but all I managed was to change the .java file to a .pbproj file and a .jar file - how do I compile a .class file and run it?
Thanks again
|
|
The Duke
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jan 2002
Location: Cambridge, England
Status:
Offline
|
|
Hello II Duce, I am a Computer Science Student in England about to enter my final year and I have used Java on my mac for ages.
Learning Java and Object Orientated programming is cool so stick with it and using the mac to do Java is excelent because you begin to appreciate it's cross platform benefits.
The first thing that you need to do in Project Builder is to create Projects of the type 'Java Tool'. This gives you a 'Main' java file where your program will start and you can add new files or classes to the project as and when you need them.
If you send me the code that won't work then I'll have a poke about with it, but in my experience everything I code in Uni and at home in PURE java runs on both windows and OSX well.
I would also suggest that if you have a fast mac then try JBuilder. It is free to students and is a powerfull intuitive app that is used a lot in industry.
Email me at: <a href="mailto:rjudd@mac.com" target="_blank">rjudd@mac.com</a>
|
|
mmmm - I'm a big Cinnamon bun.
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
<a href="http://forums.macnn.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=34;t=002611#000002" target="_blank"> the real IDE for true Java zealots</a>
|
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: May 2001
Location: Brisbane
Status:
Offline
|
|
Thanks again for the replies
I was talking to a mate of mine last night, and the reason I couldn't get it to work was because I hadn't added the directory with all the textbook projects to the classpath (or something along those lines).
The code I was trying to use came on the cd included with the text book in a folder called genesis. When I tried to compile the code, it gave me an error saying it could not import genesis. Does any of that make sense? Does anyone know how to include a directory in the classpath using project builder?
We kinda got it to work using the command line, but we had some trouble getting write access to alot of the files (we couldn't figure out how to log in as root  )
Anyways, thanks for all the help. I'm sure I'll get it working eventually
|
|
The Duke
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Dec 2000
Location: Chicago, Illinois
Status:
Offline
|
|
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">The code I was trying to use came on the cd included with the text book in a folder called genesis. When I tried to compile the code, it gave me an error saying it could not import genesis. Does any of that make sense? Does anyone know how to include a directory in the classpath using project builder?
</font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">You'll need to add it to your class path, or better yet, just drag and drop the folder genesis on the left side of project builder (the area that displays all your groups and files) to import the files into your project. The second method is much simpler.
</font><blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">quote:</font><hr /><font size="1" face="Geneva, Verdana, Arial, sans-serif">
We kinda got it to work using the command line, but we had some trouble getting write access to alot of the files (we couldn't figure out how to log in as root  )
</font><hr /></blockquote><font size="1" face="Geneva, Verdana, Arial, sans-serif">Are you running the files off the CD? CD-R's aren't writable after they are burned (and OS X doesn't allow packet writing AFAIK, so no go on CD-RW's), so you'll need to copy the files off the CD to your hard drive. If you do need root (I don't see why you would), search the forums: it's been explained a thousand times.
Matt Fahrenbacher
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|