只是蚂蚁运行的NetBeans项目

只是蚂蚁运行的NetBeans项目

本文介绍了只是蚂蚁运行的NetBeans项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有与Netbeans中构建了一个简单code。

I have a sample code that was built with Netbeans.

据build.xml文件,所以我下载了蚂蚁,并尝试运行它。

It has a build.xml file so I downloaded ant and try to run it.

我有此错误消息:

...... nbproject\build-impl.xml:76: Platform is not correctly set up

有关我所看到的,这是由固定的简单的下载NetBeans和运行从那里样本,但是......我不想安装运行10个文​​件的样本。

For what I can see, this is fixed by "simply" downloading Netbeans and running the sample from there, but... I don't want to install it to run a 10 files sample.

有没有一种解决方法与Java运行NetBeans项目?什么是正确的.properties文件我需要修改?

Is there a workaround to run Netbeans projects with Java? What's the correct .properties file I have to modify?

推荐答案

它的可能运行直接从Java / ANT生成的项目在NetBeans,但你可能需要手动设置一些属性和/或添加路径JAR文件。

It is possible to run the NetBeans generated projects straight from Java/ANT, but you may need to manually set some of the properties and/or add paths to jar files.

不幸的是,NetBeans的倾向于包括的taskdef的使用自己的JAR文件和定义仅在 /nbproject/private/private.properties 文件参考特性,这通常得到设置当您第一次打开NetBeans项目或修改为编辑在IDE中的项目。

Unfortunately, NetBeans tends to include taskdef's using their own JAR files and reference properties that are defined only in the /nbproject/private/private.properties files, which usually get set when you first open the NetBeans project or modified as you edit the project in the IDE.

如果您检查 build-impl.xml中你应该能够找到物业并从中获得需要的东西要设置的值(OS平台),则:

If you inspect the build-impl.xml you should be able to find the property and derive what value needs to be set(OS platform), then either:


  • 创建/设置在财产
    /nbproject/private.properties

  • 添加属性定义的
    的build.xml

  • 调用您的蚂蚁时,传递命令行
    针对使用 -DPlatform =富

  • create/set the property in the/nbproject/private.properties
  • add that property definition in theparent build.xml
  • pass in the commandline when invoking your anttarget using -DPlatform=Foo

我个人喜欢生成的ANT文件和目标在NetBeans的结构,但恨多的自定义/他们在堵塞专有的东西如何使人很难不NetBeans的运行。

Personally, I like the structure of the NetBeans generated ANT files and targets, but hate how much custom/proprietary stuff they jam in that makes it hard to run without NetBeans.

这篇关于只是蚂蚁运行的NetBeans项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 16:23