简体   繁体   English

如何在netbeans中创建jar文件

[英]how to create jar file in netbeans

I want to create independent jar files in netbeans like we can do in eclipse. 我想在netbeans中创建独立的jar文件,就像我们在eclipse中可以做的那样。 Normally people suggest to clean and built the project and there is a jar file created. 通常人们会建议清理和构建项目,并创建一个jar文件。 But to run these jar file the .java files, the codes are also required. 但要运行这些jar文件的.java文件,代码也是必需的。 Isn't there any way to create jar files which runs independently without requiring java codes? 有没有办法创建独立运行的jar文件而不需要java代码? Thanks 谢谢

  1. set the main class in run configuration 在运行配置中设置主类
  2. do a clean build 做一个干净的构建
  3. go to the dist folder and you can find the jar there as a runnable one 转到dist文件夹,你可以在那里找到一个可以运行的jar

for further information refer this Creating_an_Executable_Java_File_in_NetBeans 有关详细信息,请参阅Creating_an_Executable_Java_File_in_NetBeans

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM