Grep
- 298
- 3
I wouldn't assume it's Netbeans and not something you did (or didn't do). I would be pretty surprised if they've managed to break such simple and basic functionality. You can try Eclipse if you like. I tend to use it for Java and Python. But Netbeans is quite good.
While I'm thinking of it, why don't you just copy/paste messages and such into the forums rather than making us look at screenshots and such? Because I'll tell you that I didn't look at them. If you want me to look at them, paste them into the forum. Taking screenshots of text is, in most cases, really pointless.
Anyways, I took some time out to make a quick test project in my Netbeans 6.9.1 (good to know there's a 7 out, I'll try that out later). I wrote out all my steps one-by-one. It works fine for me. Here's the steps:
1. Start Netbeans
2. In the menu bar, select File->New Project.
Make sure these are selected in the dialog box:
Categories: Java
Projects: Java Application
Hit Next
Fill in the Project Name field with: ArgTest
Take note of where it is putting your project in the Project Location and
Project Folder fields.
Hit Finish
3. Edit the Main.java file and add this to the main function's body (you can remove the comment in there, of course):
4. Click "Build Main Project" icon in toolbar (a hammer). Wait for it to finish.
5. In Run menu, select "Set Project Configuration->Customize...".
In the Categories sidebar, "Run" should be selected. In the "Arguments"
text edit, enter test arguments such as (without the quotes):
"arg1 arg2 arg3 arg4"
Click Ok.
6. Click the "Run Main Project" icon in the toolbar (green arrow facing
right). In the output pane, you should see the arguments you passed in.
I see this:
If you get a different result here, I'm rather surprised.
I'll probably install the latest version of NetBeans soon, so I'll check it out again in version 7 later.
EDIT: I installed NetBeans 7 (in Linux) and ran the project I created, and the arguments came through perfectly. I can try remaking the project from scratch in 7.0 if you like. But argument passing is not broken in NetBeans 7.0, at least in general. Could be it's a Windows only bug, but I really, seriously doubt it.
While I'm thinking of it, why don't you just copy/paste messages and such into the forums rather than making us look at screenshots and such? Because I'll tell you that I didn't look at them. If you want me to look at them, paste them into the forum. Taking screenshots of text is, in most cases, really pointless.
Anyways, I took some time out to make a quick test project in my Netbeans 6.9.1 (good to know there's a 7 out, I'll try that out later). I wrote out all my steps one-by-one. It works fine for me. Here's the steps:
1. Start Netbeans
2. In the menu bar, select File->New Project.
Make sure these are selected in the dialog box:
Categories: Java
Projects: Java Application
Hit Next
Fill in the Project Name field with: ArgTest
Take note of where it is putting your project in the Project Location and
Project Folder fields.
Hit Finish
3. Edit the Main.java file and add this to the main function's body (you can remove the comment in there, of course):
Code:
for (String arg : args) {
System.out.println(arg);
}
4. Click "Build Main Project" icon in toolbar (a hammer). Wait for it to finish.
5. In Run menu, select "Set Project Configuration->Customize...".
In the Categories sidebar, "Run" should be selected. In the "Arguments"
text edit, enter test arguments such as (without the quotes):
"arg1 arg2 arg3 arg4"
Click Ok.
6. Click the "Run Main Project" icon in the toolbar (green arrow facing
right). In the output pane, you should see the arguments you passed in.
I see this:
Code:
run:
arg1
arg2
arg3
arg4
BUILD SUCCESSFUL (total time: 1 second)
If you get a different result here, I'm rather surprised.
I'll probably install the latest version of NetBeans soon, so I'll check it out again in version 7 later.
EDIT: I installed NetBeans 7 (in Linux) and ran the project I created, and the arguments came through perfectly. I can try remaking the project from scratch in 7.0 if you like. But argument passing is not broken in NetBeans 7.0, at least in general. Could be it's a Windows only bug, but I really, seriously doubt it.
Last edited: