aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Netbeans 4.1: How do I set up multiple Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Netbeans 4.1: How do I set up multiple "run" tasks in 1 project?" Watch "Netbeans 4.1: How do I set up multiple "run" tasks in 1 project?" New topic
Author

Netbeans 4.1: How do I set up multiple "run" tasks in 1 project?

Mike Kopack
Greenhorn

Joined: Jul 13, 2005
Posts: 6
Hey gang.

I've recently moved over from doing my code development in JEdit over to Netbeans 4.1. Previously, I only did my coding in JEdit, and then had some custom .bat scripts to do the compile process and then 2 different .bat's that would launch the executeable code for my project (it's a client + server, both in the same JAR file, same code-tree, etc.) (and don't ask why I didn't use Ant....)

When I was doing this with bat files, it was no problem. I would just open 2 windows, run the first .bat to start up the server, then run the second .bat to start the client.

Now that I have everything up in Netbeans, I have a project set up. But I can't figure out how to set it up to allow me to run different classes with main() in them simultaneously (or start one, then start the other).

I was hoping there'd be a way to add 2 different "run" type commands to the Ant script, but the Netbeans generated Ant script is pretty complicated and I didn't see a way to do that.

I thought maybe I could set up a second project with the same directory tree, but obviously Netbeans doesn't like that since there's already all the netbeans folders in there.

Then I thought maybe I could just do the right click on the .java containing the main() I want to run, but there's no way to pass command line args (that are needed to run) or JVM parameters.

Any suggestions? Or will I need to revert back to .bat files to do this?

Thanks!

--Mike
vijay sagar
Greenhorn

Joined: Dec 08, 2005
Posts: 3
Originally posted by Mike Kopack:
Hey gang.

I've recently moved over from doing my code development in JEdit over to Netbeans 4.1. Previously, I only did my coding in JEdit, and then had some custom .bat scripts to do the compile process and then 2 different .bat's that would launch the executeable code for my project (it's a client + server, both in the same JAR file, same code-tree, etc.) (and don't ask why I didn't use Ant....)

When I was doing this with bat files, it was no problem. I would just open 2 windows, run the first .bat to start up the server, then run the second .bat to start the client.

Now that I have everything up in Netbeans, I have a project set up. But I can't figure out how to set it up to allow me to run different classes with main() in them simultaneously (or start one, then start the other).

I was hoping there'd be a way to add 2 different "run" type commands to the Ant script, but the Netbeans generated Ant script is pretty complicated and I didn't see a way to do that.

I thought maybe I could set up a second project with the same directory tree, but obviously Netbeans doesn't like that since there's already all the netbeans folders in there.

Then I thought maybe I could just do the right click on the .java containing the main() I want to run, but there's no way to pass command line args (that are needed to run) or JVM parameters.

Any suggestions? Or will I need to revert back to .bat files to do this?

Thanks!

--Mike
vijay sagar
Greenhorn

Joined: Dec 08, 2005
Posts: 3
Mike,

If you have the answer for your question (above, posted in July 2005) please update me. I am also looking for the same. I want to do more than one RUN configurations. It'll be very helpful if you knnow the answer.

Thanks,
Vijay.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Netbeans 4.1: How do I set up multiple "run" tasks in 1 project?