DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Hack OpenJDK with NetBeans IDE
  • Build a Serverless App Fast With Zipper: Write TypeScript, Offload Everything Else
  • MuleSoft: Tactical and Strategical Role of an Application Template
  • Introduction To Template-Based Email Design With Spring Boot

Trending

  • Decoding Business Source Licensing: A New Software Licensing Model
  • Chronicle Services: Low Latency Java Microservices Without Pain
  • Hugging Face Is the New GitHub for LLMs
  • Auditing Spring Boot Using JPA, Hibernate, and Spring Data JPA
  1. DZone
  2. Coding
  3. Tools
  4. Hack Your Own Custom NetBeans Project Templates

Hack Your Own Custom NetBeans Project Templates

R. Kusterer user avatar by
R. Kusterer
·
Jun. 11, 08 · Interview
Like (0)
Save
Tweet
Share
27.49K Views

Join the DZone community and get the full member experience.

Join For Free

Somebody recently asked in a forum how he could turn NetBeans projects into project templates. Say, you want to start a series of projects with the same properties and classes, or maybe you want to pass on a well-working custom setup to colleagues.

There must be a more elegant way than copying a project directory and then refactoring it? Turns out there is: The Help menu quickly informs me to use the Project Template wizard. (Mental note to self: Look into Help menu more often.) Not only can you create custom project templates, you can even distribute and install them as easy as plugins! :D This is how:

  1. Create the project that you want to be the template, and open it in NetBeans. The template project can include properties, classes, resources, an Ant script... — whatever you need.
  2. Here's the thing: Create a new empty NetBeans Module project. Right-click the module project and create a Project Template file (New > Other > Module Development > Project Template):

    Click Next and point the Project Template wizard to the template project and assign a category, like "Java EE" or "Samples".

  3. Right-click the module project and select "Install in Development IDE". Your project template is added to the New Project dialog, in the category you assigned earlier.

Tip: Right-click the module project and select Create NBM. The template is saved as an NBM file to the module project's build directory. This way you can distribute and install your custom template like a plugin, using the Plugins Manager.

You can find a more detailed version of how to create your own project templates in my blog. Geertjan goes into even more detail in his related article about how to add Custom Project Samples. He shows you how to add a custom icon and a description, and even how to hack the New Project wizard and add new panels to it — check it out!

Template NetBeans Hack (falconry)

Opinions expressed by DZone contributors are their own.

Related

  • Hack OpenJDK with NetBeans IDE
  • Build a Serverless App Fast With Zipper: Write TypeScript, Offload Everything Else
  • MuleSoft: Tactical and Strategical Role of an Application Template
  • Introduction To Template-Based Email Design With Spring Boot

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: