简体   繁体   English

Netbeans:如何更改项目名称?

[英]Netbeans: how do I change the name of a project?

I need to change the name of my application, so people who download and install it can see the name but I don't know where to do it. 我需要更改我的应用程序的名称,因此下载和安装它的人可以看到名称,但我不知道在哪里做。

What file do I need to edit? 我需要编辑哪个文件?

you must right click on your project in Project window [ctrl + 1] and choose rename option for 你必须在项目窗口[ctrl + 1]中右键单击你的项目,然后选择重命名选项

renaming your project name. 重命名您的项目名称。

if your project is mobile Project you must right click on project name , select properties options and then on Application Descriptor edit MIDlet-name value. 如果您的项目是移动项目,您必须右键单击项目名称,选择属性选项,然后在应用程序描述符上编辑MIDlet名称值。

应用程序描述符ScreenShot

Open "project.xml" file under nbproject folder inside the project folder of the one you want to change the name. 在要更改名称的项目文件夹内的nbproject文件夹下打开“project.xml”文件。 it is in the tag <name> . 它位于<name>标签中。

Just change it and that is it. 只是改变它就是这样。

如果您的项目是基于Maven的,您可以在pom.xml中添加/更新应用程序名称(在Project Files文件夹中找到)或转到文件>>项目属性并添加/更新应用程序名称。

如果您使用gradle:BuildScripts / Project / settings.gradle

rootProject.name = 'yourprojectname'

在dir nbproject中打开project.properties查找manifest.midlets并在MIDlet之后更改名称

Rightclick on the project node and select rename. 在项目节点上单击鼠标右键,然后选择重命名。 If you want the folder of the project also to have the new name or whatever that wasnt renamd then : 如果您希望项目的文件夹也具有新名称或任何不是renamd,那么:
1. in build.xml in text editor find old name and replace with new one. 1. 在文本编辑器的build.xml中找到旧名称并替换为新名称。 Its place is: C:\\NBProjectsFolder\\OldName\\build.xml Save that. 它的位置是:C:\\ NBProjectsFolder \\ OldName \\ build.xml保存。
2. Remove all cash situated in , eg: C:\\NBProjectsFolder\\OldName\\build\\gwt-unitCache. 2. 删除位于的所有现金,例如:C:\\ NBProjectsFolder \\ OldName \\ build \\ gwt-unitCache。
3. Find in C:\\NBProjectsFolder\\OldName\\nbproject\\private private.xml file and edit it in a text redactor by renaming old name within the file. 3.在C:\\ NBProjectsFolder \\ OldName \\ nbproject \\ private private.xml文件中查找,并通过重命名文件中的旧名称在文本编辑器中编辑它。 Save that. 保存。

Do all the changes when the Netbeans was closed. 在Netbeans关闭时进行所有更改。 After opening the Ntbeans it may ask to reimport the project and all files you changed will be recognized/recreated automatically 打开Ntbeans后,它可能会要求重新导入项目,并且将自动识别/重新创建您更改的所有文件

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

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