views:

96

answers:

2

In Netbeans you can run a file by pressing Shift+F6 (on Windows)

So I have three projects open at the moment.

What I want to do is jump between the three projects and compare the results of executing a program in each of these three panes.

Netbeans seems to have a problem with this. It doesn't seem to be able to recognize that I want to execute a file in the project I have just jumped to - instead it simply re-executes the file from the project I was previously in - OR - it does nothing at all.

Am I doing something wrong?

A: 

By default, When you try to run some code, it will run what ever project you have currently set as the working project, not what project you are viewing.

Kyle G
Ah! Is ther a key command to quickly switch the working project to the one you are viewing?
A: 

In netbeans 6.5, you can choose to not set a main project.

Run >> Set Main Project >> None

This means that, what ever file you currently have open, when you tell it to run, it will run what ever file you have currently got open, and treat that project as the main project.

http://wiki.netbeans.org/mainProjectConceptualChange

Hope this helps!

Kyle G