0

I have written a Java application which generates simple java source files. Now I want to add a functionality to save those files as a Netbeans 7 project. I have seen in Netbeans projects, there are some Netbeans related files in a folder called nbproject.
So what are those compulsory files, which should be in a Netbeans project?
Is there any Netbeans library, which we too can use to generate those files?

Simply I want to do this:

  1. I have some java source files.
  2. I want to add Netbeans related file(s)
  3. So now this should be a Netbeans project
2
  • 1
    create your own simple Netbeans project and have a look at the generated files/folders? Commented Aug 27, 2012 at 12:33
  • Thanks David,But I put it as the last solution in my list :) Still looking for an easy way... Commented Aug 27, 2012 at 12:55

1 Answer 1

1

Method 1: You write your own NetBeans Module for your tasks

Method 2: You create the files with your own program

Method 3: You create a project and reuse its files (most of them are based on Freemarker templates)

Method 4: You create your own templates (eg. with Freemarker) and fill them with your programms

if you don't like #1, you may try a combination of #3 and #4: open generated files and replace all values like projectname, paths etc. which aren't variables yet with your own variables --> use them as Template

Sign up to request clarification or add additional context in comments.

1 Comment

I like #3: Simple and effective. Any other method is likely to be more complex than just modifying a few template files. Plus, this recipe works just as well for Eclipse projects, IDEA, and any other IDE...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.