Compiling a Netbeans project from the command line 从命令行编译Netbeans项目

huangapple go评论57阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年8月6日 04:49:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/63273282.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定