Newbie Java + Project Builder questions

TommyWillB

Registered
I'm thinking that OS X is a good place to begin learning Java. I have a book that tells me a fair amount about using javac on the command line, but I thought ("When in Rome...") I'd give Project Builder a try...

Here are my questions:

1) Is there any way to show line numbers in the Project Builder editor... a'la BBEdit?

2) Can Project Builder's editor do syntax coloring for HTML... again, a'la BBEdit?


3) I've managed to create an empty Project Builder project, and then add a blank Java class file to it, but I can't seem to compile from within PB. If I add a new Java Applet it will let me compile, but it won't for a simple class.

Am I doing something wrong, or is compiling a single simple class file something that I still have to use javac on the command line for?
 
4) When I create a new class file, PB automatically adds this line:
// Copyright (c) 2001 __CompanyName__. All rights reserved.

Is there a preference setting so that I can tell it what my "CompanyName" really is?

5) While I'm at it can I get it to insert my full name insteaed of my unix username into this line?
// Created by [username] on Sun Apr 08 2001.
 
PB is overkill for simple classes especially when one is learning Java, and the same is true for a lot of IDEs. I found that the easiest way to go about it is to write my classes and html files in TextEdit and save them as ascii (NOT RTF!) and then in the same directory type javac from the terminal command line. Works well and on my dualG4 500 it compiled blazingly fast! For med and larger projects, PB should be just fine.
 
jEdit is a wonderful program for writing JAVA. It will serve you well whether or not you are starting out or a 'pro'. Give it a try!
 
Originally posted by ttimes
jEdit is a wonderful program for writing JAVA. It will serve you well whether or not you are starting out or a 'pro'. Give it a try!

I tried to install jEdit, but instead of the application icon I got a folder. I also tried with MRJAppBuilder, which gave me the clickable icon, but got java exceptions at opening it. Did anybody have the same problem?
 
1) Is there any way to show line numbers in the Project Builder editor... a'la BBEdit?

Not currently, but you can keep the Goto line # panel around and it will update to reflect what line the insertion point is on. (hit command L with the editor pane active to show the panel)

2) Can Project Builder's editor do syntax coloring for HTML... again, a'la BBEdit?
Not that I know of. The old PB used the same HTML editing view as HTMLedit, but it was removed.
 
Can PB do drag-and-drop? (It doesn't work for me.)

Also, is there some way of getting a list of all the functions in a document and jumping between them?
 
Yes, PB can drag and drop. You have to drag your selection very slowly to see the effect, otherwise it will expand the selection. Option-drag will duplicate the lines. I noticed that if you drop entire lines, you might overwrite the line after your dropping location, or at least it disappears temporarily.

If you drag and drop the file icon in the middle ot the window, you can then drop the file path, e.g. in Terminal. This is handy for simple compilation: you type your file in PB, then drop the icon after

% javac

in Terminal, hit return and compile.
 
Perhaps he meant drag+drop text which I use a lot when coding.

The most annoying thing in Project Builder is Cocoa's windoze-like text selection. I hate it. I wish I could just use Code Warrior to write Cocoa apps.
 
Back
Top