Mac Basic NetBeans Questions.

Chilz0r

macrumors regular
Original poster
Jul 20, 2007
135
0
Hi All,

I have a simple question. Each time I create a new project or new class in NetBeans it gives the following code (example):

Code:
public static void main(String args[]) {
}
I'm just wondering, why is that line there? isn't "args[]" an array & why would you want that at the beginning of a program? I'm also wondering if NetBeans is the best IDE to code Java in as I am a beginner to Java, I've done a fair bit of VB.net but I find NetBeans is a really weird IDE with vague error messages and strange compile errors or maybe thats just the Java language itself? A few of the errors I get when compiling are:

2007-10-19 02:39:07.547 java[10490] CFLog (0): CFMessagePort: bootstrap_register(): failed 1103 (0x44f), port = 0x11003, name = 'java.ServiceProvider'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2007-10-19 02:39:07.555 java[10490] CFLog (99): CFMessagePortCreateLocal(): failed to name Mach port (java.ServiceProvider)
 

Loc

macrumors newbie
Jul 23, 2007
21
0
Southern California
The main() method is where you application starts. The args array is an array containing possible input from the console. For example, you might start your app in the terminal like this:

java MyFirstJavaApp Hello World

The args array will look like this

args[0]="Hello"
args[1]="World"

I don't think using Netbeans or any IDE is a good idea when you first learn a language. I'd stick with something like TextMate or jEdit.
 

mishoro

macrumors newbie
Oct 19, 2007
2
0
Packages help

I need to know where extra packages like TerminalIO have to go so that you can use them in netbeans. Please help.
 

Similar threads

  • PinkyMacGodess
2
Replies
2
Views
408
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.