You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Rick Tee <ri...@virginmedia.com.INVALID> on 2023/02/22 04:52:28 UTC
Template tutorial
Hi,
I followed the template tutorial:
https://netbeans.apache.org/tutorials/nbm-filetemplates.html
When I choose run i get:
warning: [options] bootstrap class path not set in conjunction with
-source 1.7
warning: No processor claimed any of these annotations:
TemplateRegistration,Messages
/home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:15:
error: package org.netbeans.api.templates does not exist
import org.netbeans.api.templates.TemplateRegistration;
/home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:16:
error: package org.openide.util.NbBundle does not exist
import org.openide.util.NbBundle.Messages;
/home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
error: cannot find symbol
@TemplateRegistration(
symbol: class TemplateRegistration
/home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
error: cannot find symbol
@Messages(value = "HTMLtemplate_displayName=Empty HTML file")
symbol: class Messages
4 errors
1 warning
/usr/lib/apache-netbeans/harness/common.xml:207: Compile failed; see the
compiler error output for details.
BUILD FAILED (total time: 1 second)
--
Regards
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Template tutorial
Posted by Sean Carrick <se...@pekinsoft.com>.
Antonio,
Yes, I dared to update the tutorial. I'm also going to probably start
working my way through all of the tutorials, possibly from the top of
the Learning Trails and working my way through them all...Please see my
questions on the Dev list regarding this undertaking...
-SC
On 2/25/23 5:19 AM, Antonio wrote:
> So you've dared to update the tutorial???
>
> Very well done!! Way to go! Reviewed!
>
> Thanks,
> Antonio
>
>
> On 23/2/23 23:04, Sean Carrick wrote:
>> Just as a quick follow-up, I updated the tutorial file on GitHub to
>> reflect that it was pointing to the wrong modules. Once the team has
>> a chance to review and merge my PR, the tutorial will be updated.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
> .
Re: Template tutorial
Posted by Rick Tee <ri...@virginmedia.com.INVALID>.
Erm nope not me.
On 25/02/2023 11:19, Antonio wrote:
> So you've dared to update the tutorial???
>
> Very well done!! Way to go! Reviewed!
>
> Thanks,
> Antonio
>
>
> On 23/2/23 23:04, Sean Carrick wrote:
>> Just as a quick follow-up, I updated the tutorial file on GitHub to
>> reflect that it was pointing to the wrong modules. Once the team has a
>> chance to review and merge my PR, the tutorial will be updated.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
--
Regards
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Template tutorial
Posted by Antonio <an...@vieiro.net.INVALID>.
So you've dared to update the tutorial???
Very well done!! Way to go! Reviewed!
Thanks,
Antonio
On 23/2/23 23:04, Sean Carrick wrote:
> Just as a quick follow-up, I updated the tutorial file on GitHub to
> reflect that it was pointing to the wrong modules. Once the team has a
> chance to review and merge my PR, the tutorial will be updated.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Template tutorial
Posted by Rick Tee <ri...@virginmedia.com.INVALID>.
Sean Carrick
Thank you for your time and effort, problem resolved. :)
Unfortunately the results were erm unanticipated not even sure if it's
useful, but at least it ran.
On 23/02/2023 22:04, Sean Carrick wrote:
> Rick,
>
> Just as a quick follow-up, I updated the tutorial file on GitHub to
> reflect that it was pointing to the wrong modules. Once the team has a
> chance to review and merge my PR, the tutorial will be updated.
>
> On 2/23/23 3:38 PM, Sean Carrick wrote:
>>
>> Rick,
>>
>> I just confirmed that it *is* an error in the tutorial. Apparently,
>> that tutorial was written way back with NetBeans 7.4:
>>
>> TemplateRegistration in NB7.4
>>
>> This screenshot is from my NB 7.4 installation, and as you can see,
>> the /TemplateRegistration/ class used to be in the DataSystems API
>> module. However, by the time NB 8.2 was released, it was moved to the
>> File Templates module. So, a lot of development must have happened to
>> cause the /TemplateRegistration/ class (as well as the rest of the
>> related classes) to be moved into their own module.
>>
>> I'm betting you could file an issue against that tutorial and whenever
>> someone has time they would fix the information...
>>
>> -SC
>>
>> On 2/23/23 3:15 PM, Sean Carrick wrote:
>>>
>>> Rick,
>>>
>>> I'm going to go with an error in the tutorial. I only say this
>>> because all of the tutorials currently need to be reviewed for
>>> accuracy and, in my installation of NetBeans 16, when I enter
>>> "TemplateRegistration" into the search field of the *Add Module
>>> Dependency* dialog, this is what shows up:
>>>
>>> TemplateRegistration
>>>
>>> Likewise, when I type "NbBundle" in the same search field, I get this:
>>>
>>> NbBundle
>>>
>>> It could very well be that the tutorial you are working through has
>>> not been updated in a while and is still referencing where the
>>> classes /used to be/ located. Many changes have happened with the
>>> APIs over the decades.
>>>
>>> This is why I had said in my last email to "type in" the name of the
>>> class you need. It will filter the modules list to only those modules
>>> that contain a class with that name.
>>>
>>> -SC
>>>
>>> On 2/23/23 3:28 AM, Rick Tee wrote:
>>>> Redhat 7.9
>>>> Netbeans 16
>>>> JDK 1.8
>>>>
>>>> From the Netbeans templates tutorial: "Right-click the module in the
>>>> Projects window, choose Properties, and use the Libraries tab to add
>>>> dependencies on Datasystems API and Utilities API."
>>>>
>>>> I followed the tutorial twice from scratch the result is the same.
>>>>
>>>> Looking through the project the file causing errors is:
>>>> package-info.java. Errors are:
>>>>
>>>> Cannot find symbol class TemplateRegistration
>>>> Cannot find symbol class Messages
>>>> Package org.netbeans.api.templates does not exist
>>>> Package org.openide.util.NbBundle does not exist
>>>>
>>>> Something missing from the installation? or error/s in the tutorial?
>>>>
>>>> Apologies for the replies to wrong address.
>>>>
>>>> On 23/02/2023 04:42, Sean Carrick wrote:
>>>>> Rick,
>>>>>
>>>>> You need to set a dependency in each module that uses them on the
>>>>> /File Templates/ and /Base Utilities API/ libraries in order to use
>>>>> them.
>>>>>
>>>>> Per your compiler output:
>>>>>
>>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
>>>>> error: cannot find symbol
>>>>> @TemplateRegistration(
>>>>> symbol: class TemplateRegistration
>>>>>
>>>>> You do not have a dependency on the /File Templates/ NetBeans API.
>>>>>
>>>>> Per your compiler output:
>>>>>
>>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
>>>>> error: cannot find symbol
>>>>> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
>>>>> symbol: class Messages
>>>>>
>>>>> You do not have a dependency on the /Base Utilities API/.
>>>>>
>>>>> When creating application or modules against the NetBeans Platform,
>>>>> you must be specific and explicit in your dependency declarations.
>>>>> To add these dependencies, click on the /Libraries/ node in the
>>>>> Projects window for each of the module projects that need to use
>>>>> these features and select /Add Module Dependency.../ In the field
>>>>> at the top of the dialog, type in "TemplateRegistration" and the
>>>>> list will filter down to only show the /File Templates/ module.
>>>>> Likewise, type in "NbBundle" or "NbBundle.Messages" and the list
>>>>> will filter down to /Base Utilities API/. Add each of those to your
>>>>> module and recompile. You should be fine then.
>>>>>
>>>>> Also, it helps if, when you are asking for help, you include which
>>>>> version of NetBeans, which version of the JDK, and what build
>>>>> system you are using.
>>>>>
>>>>> -SC
>>>>>
>>>>> On 2/21/23 10:52 PM, Rick Tee wrote:
>>>>>> Hi,
>>>>>> I followed the template tutorial:
>>>>>> https://netbeans.apache.org/tutorials/nbm-filetemplates.html
>>>>>>
>>>>>> When I choose run i get:
>>>>>>
>>>>>> warning: [options] bootstrap class path not set in conjunction
>>>>>> with -source 1.7
>>>>>> warning: No processor claimed any of these annotations:
>>>>>> TemplateRegistration,Messages
>>>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:15: error: package org.netbeans.api.templates does not exist
>>>>>> import org.netbeans.api.templates.TemplateRegistration;
>>>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:16: error: package org.openide.util.NbBundle does not exist
>>>>>> import org.openide.util.NbBundle.Messages;
>>>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5: error: cannot find symbol
>>>>>> @TemplateRegistration(
>>>>>> symbol: class TemplateRegistration
>>>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12: error: cannot find symbol
>>>>>> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
>>>>>> symbol: class Messages
>>>>>> 4 errors
>>>>>> 1 warning
>>>>>> /usr/lib/apache-netbeans/harness/common.xml:207: Compile failed;
>>>>>> see the compiler error output for details.
>>>>>> BUILD FAILED (total time: 1 second)
>>>>>>
>>>>>
>>>>
>
--
Regards
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Template tutorial
Posted by Sean Carrick <se...@pekinsoft.com>.
Rick,
Just as a quick follow-up, I updated the tutorial file on GitHub to
reflect that it was pointing to the wrong modules. Once the team has a
chance to review and merge my PR, the tutorial will be updated.
On 2/23/23 3:38 PM, Sean Carrick wrote:
>
> Rick,
>
> I just confirmed that it *is* an error in the tutorial. Apparently,
> that tutorial was written way back with NetBeans 7.4:
>
> TemplateRegistration in NB7.4
>
> This screenshot is from my NB 7.4 installation, and as you can see,
> the /TemplateRegistration/ class used to be in the DataSystems API
> module. However, by the time NB 8.2 was released, it was moved to the
> File Templates module. So, a lot of development must have happened to
> cause the /TemplateRegistration/ class (as well as the rest of the
> related classes) to be moved into their own module.
>
> I'm betting you could file an issue against that tutorial and whenever
> someone has time they would fix the information...
>
> -SC
>
> On 2/23/23 3:15 PM, Sean Carrick wrote:
>>
>> Rick,
>>
>> I'm going to go with an error in the tutorial. I only say this
>> because all of the tutorials currently need to be reviewed for
>> accuracy and, in my installation of NetBeans 16, when I enter
>> "TemplateRegistration" into the search field of the *Add Module
>> Dependency* dialog, this is what shows up:
>>
>> TemplateRegistration
>>
>> Likewise, when I type "NbBundle" in the same search field, I get this:
>>
>> NbBundle
>>
>> It could very well be that the tutorial you are working through has
>> not been updated in a while and is still referencing where the
>> classes /used to be/ located. Many changes have happened with the
>> APIs over the decades.
>>
>> This is why I had said in my last email to "type in" the name of the
>> class you need. It will filter the modules list to only those modules
>> that contain a class with that name.
>>
>> -SC
>>
>> On 2/23/23 3:28 AM, Rick Tee wrote:
>>> Redhat 7.9
>>> Netbeans 16
>>> JDK 1.8
>>>
>>> From the Netbeans templates tutorial: "Right-click the module in the
>>> Projects window, choose Properties, and use the Libraries tab to add
>>> dependencies on Datasystems API and Utilities API."
>>>
>>> I followed the tutorial twice from scratch the result is the same.
>>>
>>> Looking through the project the file causing errors is:
>>> package-info.java. Errors are:
>>>
>>> Cannot find symbol class TemplateRegistration
>>> Cannot find symbol class Messages
>>> Package org.netbeans.api.templates does not exist
>>> Package org.openide.util.NbBundle does not exist
>>>
>>> Something missing from the installation? or error/s in the tutorial?
>>>
>>> Apologies for the replies to wrong address.
>>>
>>> On 23/02/2023 04:42, Sean Carrick wrote:
>>>> Rick,
>>>>
>>>> You need to set a dependency in each module that uses them on the
>>>> /File Templates/ and /Base Utilities API/ libraries in order to use
>>>> them.
>>>>
>>>> Per your compiler output:
>>>>
>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
>>>> error: cannot find symbol
>>>> @TemplateRegistration(
>>>> symbol: class TemplateRegistration
>>>>
>>>> You do not have a dependency on the /File Templates/ NetBeans API.
>>>>
>>>> Per your compiler output:
>>>>
>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
>>>> error: cannot find symbol
>>>> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
>>>> symbol: class Messages
>>>>
>>>> You do not have a dependency on the /Base Utilities API/.
>>>>
>>>> When creating application or modules against the NetBeans Platform,
>>>> you must be specific and explicit in your dependency declarations.
>>>> To add these dependencies, click on the /Libraries/ node in the
>>>> Projects window for each of the module projects that need to use
>>>> these features and select /Add Module Dependency.../ In the field
>>>> at the top of the dialog, type in "TemplateRegistration" and the
>>>> list will filter down to only show the /File Templates/ module.
>>>> Likewise, type in "NbBundle" or "NbBundle.Messages" and the list
>>>> will filter down to /Base Utilities API/. Add each of those to your
>>>> module and recompile. You should be fine then.
>>>>
>>>> Also, it helps if, when you are asking for help, you include which
>>>> version of NetBeans, which version of the JDK, and what build
>>>> system you are using.
>>>>
>>>> -SC
>>>>
>>>> On 2/21/23 10:52 PM, Rick Tee wrote:
>>>>> Hi,
>>>>> I followed the template tutorial:
>>>>> https://netbeans.apache.org/tutorials/nbm-filetemplates.html
>>>>>
>>>>> When I choose run i get:
>>>>>
>>>>> warning: [options] bootstrap class path not set in conjunction
>>>>> with -source 1.7
>>>>> warning: No processor claimed any of these annotations:
>>>>> TemplateRegistration,Messages
>>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:15:
>>>>> error: package org.netbeans.api.templates does not exist
>>>>> import org.netbeans.api.templates.TemplateRegistration;
>>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:16:
>>>>> error: package org.openide.util.NbBundle does not exist
>>>>> import org.openide.util.NbBundle.Messages;
>>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
>>>>> error: cannot find symbol
>>>>> @TemplateRegistration(
>>>>> symbol: class TemplateRegistration
>>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
>>>>> error: cannot find symbol
>>>>> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
>>>>> symbol: class Messages
>>>>> 4 errors
>>>>> 1 warning
>>>>> /usr/lib/apache-netbeans/harness/common.xml:207: Compile failed;
>>>>> see the compiler error output for details.
>>>>> BUILD FAILED (total time: 1 second)
>>>>>
>>>>
>>>
Re: Template tutorial
Posted by Sean Carrick <se...@pekinsoft.com>.
Rick,
I just confirmed that it *is* an error in the tutorial. Apparently, that
tutorial was written way back with NetBeans 7.4:
TemplateRegistration in NB7.4
This screenshot is from my NB 7.4 installation, and as you can see, the
/TemplateRegistration/ class used to be in the DataSystems API module.
However, by the time NB 8.2 was released, it was moved to the File
Templates module. So, a lot of development must have happened to cause
the /TemplateRegistration/ class (as well as the rest of the related
classes) to be moved into their own module.
I'm betting you could file an issue against that tutorial and whenever
someone has time they would fix the information...
-SC
On 2/23/23 3:15 PM, Sean Carrick wrote:
>
> Rick,
>
> I'm going to go with an error in the tutorial. I only say this because
> all of the tutorials currently need to be reviewed for accuracy and,
> in my installation of NetBeans 16, when I enter "TemplateRegistration"
> into the search field of the *Add Module Dependency* dialog, this is
> what shows up:
>
> TemplateRegistration
>
> Likewise, when I type "NbBundle" in the same search field, I get this:
>
> NbBundle
>
> It could very well be that the tutorial you are working through has
> not been updated in a while and is still referencing where the classes
> /used to be/ located. Many changes have happened with the APIs over
> the decades.
>
> This is why I had said in my last email to "type in" the name of the
> class you need. It will filter the modules list to only those modules
> that contain a class with that name.
>
> -SC
>
> On 2/23/23 3:28 AM, Rick Tee wrote:
>> Redhat 7.9
>> Netbeans 16
>> JDK 1.8
>>
>> From the Netbeans templates tutorial: "Right-click the module in the
>> Projects window, choose Properties, and use the Libraries tab to add
>> dependencies on Datasystems API and Utilities API."
>>
>> I followed the tutorial twice from scratch the result is the same.
>>
>> Looking through the project the file causing errors is:
>> package-info.java. Errors are:
>>
>> Cannot find symbol class TemplateRegistration
>> Cannot find symbol class Messages
>> Package org.netbeans.api.templates does not exist
>> Package org.openide.util.NbBundle does not exist
>>
>> Something missing from the installation? or error/s in the tutorial?
>>
>> Apologies for the replies to wrong address.
>>
>> On 23/02/2023 04:42, Sean Carrick wrote:
>>> Rick,
>>>
>>> You need to set a dependency in each module that uses them on the
>>> /File Templates/ and /Base Utilities API/ libraries in order to use
>>> them.
>>>
>>> Per your compiler output:
>>>
>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
>>> error: cannot find symbol
>>> @TemplateRegistration(
>>> symbol: class TemplateRegistration
>>>
>>> You do not have a dependency on the /File Templates/ NetBeans API.
>>>
>>> Per your compiler output:
>>>
>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
>>> error: cannot find symbol
>>> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
>>> symbol: class Messages
>>>
>>> You do not have a dependency on the /Base Utilities API/.
>>>
>>> When creating application or modules against the NetBeans Platform,
>>> you must be specific and explicit in your dependency declarations.
>>> To add these dependencies, click on the /Libraries/ node in the
>>> Projects window for each of the module projects that need to use
>>> these features and select /Add Module Dependency.../ In the field at
>>> the top of the dialog, type in "TemplateRegistration" and the list
>>> will filter down to only show the /File Templates/ module. Likewise,
>>> type in "NbBundle" or "NbBundle.Messages" and the list will filter
>>> down to /Base Utilities API/. Add each of those to your module and
>>> recompile. You should be fine then.
>>>
>>> Also, it helps if, when you are asking for help, you include which
>>> version of NetBeans, which version of the JDK, and what build system
>>> you are using.
>>>
>>> -SC
>>>
>>> On 2/21/23 10:52 PM, Rick Tee wrote:
>>>> Hi,
>>>> I followed the template tutorial:
>>>> https://netbeans.apache.org/tutorials/nbm-filetemplates.html
>>>>
>>>> When I choose run i get:
>>>>
>>>> warning: [options] bootstrap class path not set in conjunction with
>>>> -source 1.7
>>>> warning: No processor claimed any of these annotations:
>>>> TemplateRegistration,Messages
>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:15:
>>>> error: package org.netbeans.api.templates does not exist
>>>> import org.netbeans.api.templates.TemplateRegistration;
>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:16:
>>>> error: package org.openide.util.NbBundle does not exist
>>>> import org.openide.util.NbBundle.Messages;
>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
>>>> error: cannot find symbol
>>>> @TemplateRegistration(
>>>> symbol: class TemplateRegistration
>>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
>>>> error: cannot find symbol
>>>> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
>>>> symbol: class Messages
>>>> 4 errors
>>>> 1 warning
>>>> /usr/lib/apache-netbeans/harness/common.xml:207: Compile failed;
>>>> see the compiler error output for details.
>>>> BUILD FAILED (total time: 1 second)
>>>>
>>>
>>
Re: Template tutorial
Posted by Sean Carrick <se...@pekinsoft.com>.
Rick,
I'm going to go with an error in the tutorial. I only say this because
all of the tutorials currently need to be reviewed for accuracy and, in
my installation of NetBeans 16, when I enter "TemplateRegistration" into
the search field of the *Add Module Dependency* dialog, this is what
shows up:
TemplateRegistration
Likewise, when I type "NbBundle" in the same search field, I get this:
NbBundle
It could very well be that the tutorial you are working through has not
been updated in a while and is still referencing where the classes /used
to be/ located. Many changes have happened with the APIs over the decades.
This is why I had said in my last email to "type in" the name of the
class you need. It will filter the modules list to only those modules
that contain a class with that name.
-SC
On 2/23/23 3:28 AM, Rick Tee wrote:
> Redhat 7.9
> Netbeans 16
> JDK 1.8
>
> From the Netbeans templates tutorial: "Right-click the module in the
> Projects window, choose Properties, and use the Libraries tab to add
> dependencies on Datasystems API and Utilities API."
>
> I followed the tutorial twice from scratch the result is the same.
>
> Looking through the project the file causing errors is:
> package-info.java. Errors are:
>
> Cannot find symbol class TemplateRegistration
> Cannot find symbol class Messages
> Package org.netbeans.api.templates does not exist
> Package org.openide.util.NbBundle does not exist
>
> Something missing from the installation? or error/s in the tutorial?
>
> Apologies for the replies to wrong address.
>
> On 23/02/2023 04:42, Sean Carrick wrote:
>> Rick,
>>
>> You need to set a dependency in each module that uses them on the
>> /File Templates/ and /Base Utilities API/ libraries in order to use
>> them.
>>
>> Per your compiler output:
>>
>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
>> error: cannot find symbol
>> @TemplateRegistration(
>> symbol: class TemplateRegistration
>>
>> You do not have a dependency on the /File Templates/ NetBeans API.
>>
>> Per your compiler output:
>>
>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
>> error: cannot find symbol
>> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
>> symbol: class Messages
>>
>> You do not have a dependency on the /Base Utilities API/.
>>
>> When creating application or modules against the NetBeans Platform,
>> you must be specific and explicit in your dependency declarations. To
>> add these dependencies, click on the /Libraries/ node in the Projects
>> window for each of the module projects that need to use these
>> features and select /Add Module Dependency.../ In the field at the
>> top of the dialog, type in "TemplateRegistration" and the list will
>> filter down to only show the /File Templates/ module. Likewise, type
>> in "NbBundle" or "NbBundle.Messages" and the list will filter down to
>> /Base Utilities API/. Add each of those to your module and recompile.
>> You should be fine then.
>>
>> Also, it helps if, when you are asking for help, you include which
>> version of NetBeans, which version of the JDK, and what build system
>> you are using.
>>
>> -SC
>>
>> On 2/21/23 10:52 PM, Rick Tee wrote:
>>> Hi,
>>> I followed the template tutorial:
>>> https://netbeans.apache.org/tutorials/nbm-filetemplates.html
>>>
>>> When I choose run i get:
>>>
>>> warning: [options] bootstrap class path not set in conjunction with
>>> -source 1.7
>>> warning: No processor claimed any of these annotations:
>>> TemplateRegistration,Messages
>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:15:
>>> error: package org.netbeans.api.templates does not exist
>>> import org.netbeans.api.templates.TemplateRegistration;
>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:16:
>>> error: package org.openide.util.NbBundle does not exist
>>> import org.openide.util.NbBundle.Messages;
>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
>>> error: cannot find symbol
>>> @TemplateRegistration(
>>> symbol: class TemplateRegistration
>>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
>>> error: cannot find symbol
>>> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
>>> symbol: class Messages
>>> 4 errors
>>> 1 warning
>>> /usr/lib/apache-netbeans/harness/common.xml:207: Compile failed; see
>>> the compiler error output for details.
>>> BUILD FAILED (total time: 1 second)
>>>
>>
>
Re: Template tutorial
Posted by Rick Tee <ri...@virginmedia.com.INVALID>.
Redhat 7.9
Netbeans 16
JDK 1.8
From the Netbeans templates tutorial: "Right-click the module in the
Projects window, choose Properties, and use the Libraries tab to add
dependencies on Datasystems API and Utilities API."
I followed the tutorial twice from scratch the result is the same.
Looking through the project the file causing errors is:
package-info.java. Errors are:
Cannot find symbol class TemplateRegistration
Cannot find symbol class Messages
Package org.netbeans.api.templates does not exist
Package org.openide.util.NbBundle does not exist
Something missing from the installation? or error/s in the tutorial?
Apologies for the replies to wrong address.
On 23/02/2023 04:42, Sean Carrick wrote:
> Rick,
>
> You need to set a dependency in each module that uses them on the /File
> Templates/ and /Base Utilities API/ libraries in order to use them.
>
> Per your compiler output:
>
>
> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
> error: cannot find symbol
> @TemplateRegistration(
> symbol: class TemplateRegistration
>
> You do not have a dependency on the /File Templates/ NetBeans API.
>
> Per your compiler output:
>
>
> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
> error: cannot find symbol
> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
> symbol: class Messages
>
> You do not have a dependency on the /Base Utilities API/.
>
> When creating application or modules against the NetBeans Platform, you
> must be specific and explicit in your dependency declarations. To add
> these dependencies, click on the /Libraries/ node in the Projects window
> for each of the module projects that need to use these features and
> select /Add Module Dependency.../ In the field at the top of the dialog,
> type in "TemplateRegistration" and the list will filter down to only
> show the /File Templates/ module. Likewise, type in "NbBundle" or
> "NbBundle.Messages" and the list will filter down to /Base Utilities
> API/. Add each of those to your module and recompile. You should be fine
> then.
>
> Also, it helps if, when you are asking for help, you include which
> version of NetBeans, which version of the JDK, and what build system you
> are using.
>
> -SC
>
> On 2/21/23 10:52 PM, Rick Tee wrote:
>> Hi,
>> I followed the template tutorial:
>> https://netbeans.apache.org/tutorials/nbm-filetemplates.html
>>
>> When I choose run i get:
>>
>> warning: [options] bootstrap class path not set in conjunction with
>> -source 1.7
>> warning: No processor claimed any of these annotations:
>> TemplateRegistration,Messages
>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:15: error: package org.netbeans.api.templates does not exist
>> import org.netbeans.api.templates.TemplateRegistration;
>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:16: error: package org.openide.util.NbBundle does not exist
>> import org.openide.util.NbBundle.Messages;
>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5: error: cannot find symbol
>> @TemplateRegistration(
>> symbol: class TemplateRegistration
>> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12: error: cannot find symbol
>> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
>> symbol: class Messages
>> 4 errors
>> 1 warning
>> /usr/lib/apache-netbeans/harness/common.xml:207: Compile failed; see
>> the compiler error output for details.
>> BUILD FAILED (total time: 1 second)
>>
>
--
Regards
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Template tutorial
Posted by Sean Carrick <se...@pekinsoft.com>.
Rick,
You need to set a dependency in each module that uses them on the /File
Templates/ and /Base Utilities API/ libraries in order to use them.
Per your compiler output:
/home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
error: cannot find symbol
@TemplateRegistration(
symbol: class TemplateRegistration
You do not have a dependency on the /File Templates/ NetBeans API.
Per your compiler output:
/home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
error: cannot find symbol
@Messages(value = "HTMLtemplate_displayName=Empty HTML file")
symbol: class Messages
You do not have a dependency on the /Base Utilities API/.
When creating application or modules against the NetBeans Platform, you
must be specific and explicit in your dependency declarations. To add
these dependencies, click on the /Libraries/ node in the Projects window
for each of the module projects that need to use these features and
select /Add Module Dependency.../ In the field at the top of the dialog,
type in "TemplateRegistration" and the list will filter down to only
show the /File Templates/ module. Likewise, type in "NbBundle" or
"NbBundle.Messages" and the list will filter down to /Base Utilities
API/. Add each of those to your module and recompile. You should be fine
then.
Also, it helps if, when you are asking for help, you include which
version of NetBeans, which version of the JDK, and what build system you
are using.
-SC
On 2/21/23 10:52 PM, Rick Tee wrote:
> Hi,
> I followed the template tutorial:
> https://netbeans.apache.org/tutorials/nbm-filetemplates.html
>
> When I choose run i get:
>
> warning: [options] bootstrap class path not set in conjunction with
> -source 1.7
> warning: No processor claimed any of these annotations:
> TemplateRegistration,Messages
> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:15:
> error: package org.netbeans.api.templates does not exist
> import org.netbeans.api.templates.TemplateRegistration;
> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:16:
> error: package org.openide.util.NbBundle does not exist
> import org.openide.util.NbBundle.Messages;
> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:5:
> error: cannot find symbol
> @TemplateRegistration(
> symbol: class TemplateRegistration
> /home/rick/Projects/AdditionalFileTemplates/src/org/myorg/additionalfiletemplates/package-info.java:12:
> error: cannot find symbol
> @Messages(value = "HTMLtemplate_displayName=Empty HTML file")
> symbol: class Messages
> 4 errors
> 1 warning
> /usr/lib/apache-netbeans/harness/common.xml:207: Compile failed; see
> the compiler error output for details.
> BUILD FAILED (total time: 1 second)
>