0

(New to NetBean using v7.1.1)

I am working on a java class library that is a plugin to a larger application (.exe). I would like to have my host application start when press the F6 button or do the run->Run Project menu item. I am starting from the java class library generated project and overriding the run and run-single targets in the generated build.xml. I am testing the ant script with a run target like this

<target depends="init,compile" description="Test target" name="run">
    <echo>run target echo - Application startup would go here</echo>
</target>

Going to the files tab, right clicking on the build.xml file and going through the Run-Target->run context menu can the behavior I want (run target echo... in the output window or starting my host application). But the F6 keypress just brings up a dialog titled Run Project asking me to Select the main class. My code will never have a class with a main function.

After seeing this question and it's linked bug report I have switched off "Compile on Save" which did not make any difference.

Am I using the correct kind of NetBeans generated project for my situation?

Is there some other netbeans setting that I need to frob the get the behavior I want?

Community
  • 1
  • 1
Rodney Schuler
  • 2,158
  • 4
  • 23
  • 34

1 Answers1

0

Add a class with a main method in it to use for testing and remove the class when the library is working properly. I use Netbeans pretty much everyday and that's the simple approach I have taken to test the libraries I have created.

ChadNC
  • 2,528
  • 4
  • 25
  • 39