英文:
Compiling a Netbeans project from the command line
问题
Netbeans是否在打开项目时设置了任何变量或类似的内容,以便编译项目时需要使用?
英文:
I am currently trying to compile my project that I created with Netbeans. When I compile the project with ant from a computer where I already opened the project in Netbeans everything works out fine, however if I do the same on a different computer, it does not seem to recognize the libraries I have used and I get a NoClassDefFound error when I try to run the jar file that was created. If i than again open the project in Netbeans
Does Netbeans set any variables or anything like that on opening the project that are needed to compile it?
答案1
得分: 0
Netbeans在安装时会附带一些自定义的Ant任务。即使在同一台计算机上,如果您使用的是与Netbeans提供的Java/Ant安装不同的版本,可能会遇到问题。
这正是在另一台计算机上发生的情况:您的Java/Ant安装与Netbeans毫无关系。
英文:
Netbeans installs Ant with some custom ant tasks. Even if on the same computer, if you use a different java/ant installation than what is provided by Netbeans you may run into problems.
That is exactly what happened on the other computer: You have a java/ant installation that knows nothing about Netbeans.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论