![]() ![]() You should avoid using Tools > Java Platform to add a jar to a project. It will also be used to provide addition information when you use code completion in the editor. This additional information about widget.jar will be used by NetBeans as you debug code. If you create a NetBeans Library for widget.jar, you can also associate source code for the jar's content and Javadoc for the APIs defined in widget.jar. You can also create a Library that contains the jar file and then include that Library in the Compile-time or Run-time Libraries list. You can add the jars directly to the Libraries list in the project properties. If your source code has imports for classes in some other jar and the source code for those classes has import statements that reference classes in widget.jar, you should add widget.jar to the Run-time libraries list. (The jar widget.jar will automatically be added to your project's Run-time Libraries). If your project's source code has import statements that reference classes that are in widget.jar, you should add the jar to your projects Compile-time Libraries. ![]() For all your future projects, instead of manually assigning the libraries you can simply select to import them from your Library Manager. The latter is simply your regular java libraries, while the former is just a way for your to store a set of libraries under a common name. If for instance your project is packaged into a war/ear, then these libraries will be included in the package.Īs for the other alernatives you have either global libraries using Library Manageror jdk libraries. This is probably what you want in most cases. Run-time libraries are libraries which is needed both for compilation and when running your project. You want to vary API and implementation, or when the library is supplied by the container (which is typically the case with rvlet which is required to compile but provided by the application server, e.g., Apache Tomcat). Libraries of this kind must be provided by the container running your project. They are not included when your application is assembled (e.g., into a war-file). ![]() You want to add libraries to your project and in doing so you have two options as you yourself identified:Ĭompile-time libraries are libraries which is needed to compile your application. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |