I am trying to create a new project in netbeans. But when I add folder in the projects it always throws error: "package folder already used in project netbeans".
I deleted all folders in c:/users/../.netbeans/6.9/var/.
Still I am getting the same issue. The error mentions a folder already packaged as some old package name, but that old package name is not available in my system folders. Can anyone please help me?
I found the solution: Actually my folder already contained a pom.xml file. Due to that it was not taking the new projects. I found this solution from this link.
If your existing project folder contains a sub folder called "nbproject" . Delete the folder and then add it .The folder contains files regarding previous net-beans related project settings.
I am importing in Net-beans 7.2 from an earlier version.
I had this problem and used all of the mentioned way but could not solve it. I change the name of folder that want to add and now it work properly.
Related
I am trying to make a package of a specific folder "/content/diagnostics/states" to migrate it to a different instance of AEM. but it's not being included when I try to build the package, the package manager is just giving me an empty "/content/diagnostics" folder. Any idea of whats going on?
See screenshots:
Figured it out, all the nodes were there in a hidden .content.xml file
i imported a jfeonix jar file into my Netbeans project while it was in my pen drive. And it worked fine while the pen drive was still plugged on.
When i removed my pen, i cannot build my project and it says that
**Could not find resource file **
Then i tried copying the jar file to my desktop and then importing it again to the libraries of my project.. It would still give the same error, and the fact i fine surprising is that it still gives the same path as it was inside my pen drive even after i imported the jar file again from the Desktop..
So i was thinking what if i can changed the path to refer the jar file manually from inside the project...
has anyone faced this problem before?
Hope someone can help me with this..
Thanks in advance
i found the answer while doing a lot of things to my project..
apparently it seems that even if we delete the jar file from the library, it somehow is still there. and that's why it gives the same path even if we import the jar file again from a different place.
here's the answer i found, just in case someone faced this
Go to Project Properties in File Menu, there under Libraries u can see all the libraries that were imported..
like shown in the above picture, the other jar files i imported previously are noted as Broken reference.. So i just removed and it did the magic =D
My environment:
Netbean 6.9.1
Glassfish 3.0.1
Windows 7
Goal:
When my coworkers opens the Netbean Project, the library is already referenced without them manually create library, adding jars into it and reference it.
Detail:
I created Netbean project and the project has reference to few jar files in the folder.
Currently whoever opens the project for the first time, they have to manually create library and refer it to the project.
My project location:
C:\Users\masatosan\Desktop\myProject\myApp
My library location:
C:\Users\masatosan\Desktop\myProject\lib\myLib
The myLib folder contains:
some1.jar
some2.jar
some3.jar
I can achieve my goal if I create reference to individual jar file by defining to project.properties file like below: (creating reference to sqljdbc4.jar)
file.reference.sqljdbc4.jar=../lib/sqljdbc4.jar
javac.classpath=\
${libs.restlib_gfv3ee6.classpath}:\
${file.reference.sqljdbc4.jar}:
But my case is different since I have 3 jars in the myLib folder and wanting to reference them all.
Is it possible to reference all jars in myLib folder?
Please let me know if you need more clarification.
I'm sorry, but it doesn't work that way. When you create a project, you have to add the jar files individually.
However, if you put your lib folder under your project, netbeans will refer to them via relative paths. Then when you share the project (lib directory included), netbeans will be able to automatically find the jar files when the next person uses the project. That way you only have to add jar files once.
Short of using a dependency management tool like maven (which Netbeans has good support for), this is really the best solution. It uses a bit more disk space (obviously), but that's never been a huge issue for me.
I figured how so let me share.
Tool --> Library then library window pop up.
Create library called "MyLib" which contains multiple jars.
Add "MyLib" to your project. This change will be written to project.properties file under nbproject folder.
project.properties file indicates the classpath of lib reference you just added.
It should look like something below
javac.classpath=\
${libs.Excella.classpath}:\
${libs.MyLib.classpath}
Now someone else opens the project from different machine and she just needs to do step#1 and #2, which is to create library with same library name i.e. "MyLib"
I think this is what Bill was saying originally but thought it would be helpful to give step by step instructions since I finally figured .... after long time :D
I'm using NetBeans to develop J2EE web service.
NetBeans create a directory called nbproject inside my project directory.
I'm wondering if I should put this directory under source control. I think it is required to build the project without NetBeans.
This is usually not required. Think of it this way: If I was to check out your project but happened to be using a different IDE, I would not require your nbproject directory. In other words: This directory is machine specific, not project specific. Hope this helps.
The nbProject folder contains all the netbeans metadata about your project. When you go Project -> properties all the settings (and others) that you find there are stored in the nbProjects folder.
EDIT:
This has been answered in another question, and the answer there is more complete and accurate
In short you should include nbproject, but not nbproject/private
If you are building your project with Maven or Gradle you should definitely exclude the folder from the VCS.
In NetBeans 6.7.1, I had a Java project in which I renamed some classes. After renaming them, the code completion showed the old names of the classes and not the new names. When I would build a project that depended on this project, I noticed it would even create the .class files for the old classes. If I deleted the renamed classes and created them from scratch, the issue persisted. I could find no references to the old names of the classes in my project folder using grep. I would also get runtime errors where I had code using the new class names. When I would build the project though, it was successful. What could be the issue?
After trying many different things, deleting my NetBeans cache folder and restarting NetBeans was the only remedy for the problem. On Windows, the cache folder is located at C:\Documents and Settings\USERNAME\.netbeans\6.7\var\cache. This seems to be a bug in NetBeans.
This bug seems to still exist in 7.1, same problem with old .class files and removing the cache folder fixed it