What is ${project.licensePath}?

java, netbeans

Solution

There's an easier way.

Here's how to change the license for all new files you create in a project of yours:

- Right click on the project icon

- Click on Properties

- Click on License Headers

- Select Apache License 2.0 (or whatever) from the drop-down list

Done

Problem

I want to be able to set what license is used in the comment block at the top of a netbeans file. When I look at the template, I see this: ``` <#assign licenseFirst = "/*"> <#assign licensePrefix = " * "> <#assign licenseLast = " */"> <#include "${project.licensePath}"> ``` If this were to actually place a license at the top of my code, I would be delighted. The question is, how do I set `${project.licensePath}`, and what should I set it to for, say, the GPL?

Original source