个人工具

UbuntuHelp:Netbeans

来自Ubuntu中文

Oneleaf讨论 | 贡献2007年5月13日 (日) 11:32的版本 (New page: {{From|https://help.ubuntu.com/community/Netbeans}} {{Languages|php5}} Parent page: Programming Applications The [http://www.netbeans.org/products/ide/ NetBe...)

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索

Parent page: Programming Applications


The NetBeans IDE is an open-source, fast and feature full tool for developing Java software. It is standards compliant and runs on any operating system where a Java Virtual Machine is available.

For instructions on installing Netbeans 4.1 on AMD64, see UbuntuHelp:Netbeans4.1onAMD64.

Installation

To install and run Netbeans, you will need to have an Java SDK. The default Java JRE provided with Breezy (GCJ) is not enough to install and run Netbeans. To install a Java SDK, see "Getting Java" on RestrictedFormats.

Download Netbeans from their download page, choose the version that suits your needs.

Open a terminal and cd to the folder where you put the downloaded file and make this file executable.

 cd <your_download_dir>
 chmod +x <downloaded_file>
</code>

To install system-wide installation, run the file with sudo and follow the instruction.
<pre>
 sudo ./<downloaded_file>
</code>

To install for your user, simply run the file and follow the instruction. When asked, choose an install directory and be sure your user has write access to it.
<pre>
 ./<downloaded_file>
</code>

Note: If Netbeans is unable to find JDK try appending -is:javahome /usr/lib/jvm/java-* to the install command.

To run Netbeans, use <netbeans_install_dir>/bin/netbeans.

== Post-Installation Setup ==
If you install system-wide a Netbeans bundled with Sun's J2EE Application Server, you will not be able to use the default domain (domain1) from a non-privileged user account. The installed files are owned by the root account and some are read/write protected. An easy solution is to give all the files in the domain1 directory to your user.
<pre>
 sudo chown -R <your_user>:<your_user> <SUNWappserver_install_dir>/domains/domain1
</code>

In Netbeans, in the "Runtime" right-click to the "Server" item to "Add Server...". In the wizard, use your SUNWappserver directory as "Platform Location" and choose yhe default domain in the drop-down box.  After clicking "Next", enter the default admin user (admin) and password (adminadmin) and click "Finish".

A more cleaner solution, is to make a copy of domain1 and then give files in this copy to your user. Because they contain path specific information, you will have to edit the following files: bin/starserv and bin/stopserv.
<pre>
  sudo cp -R <SUNWappserver_install_dir>/domains/domain1 <copy_destination>
  sudo chown -R <your_user>:<your_user> <copy_destination>/domain1
  cd <copy_destination>/domain1
  gedit bin/startserv bin/stopserv
</code>
in each file, search the line that looks like
<pre>
  INSTANCE_ROOT=<SUNWappserver_install_dir>/domains/domain1
</code>
and replace it with
<pre>
  INSTANCE_ROOT=<copy_destination>/domain1
</code>

In Netbeans, in the "Runtime" right-click to the "Server" item to "Add Server...". In the wizard, use your SUNWappserver directory as "Platform Location", choose "Register Local Domain" and click "Next". Use your copy of domain1 as "Domain Folder" and, after clicking "Next", enter the default admin user (admin) and password (adminadmin) and click "Finish".
----
CategoryDocumentation

[[category:UbuntuHelp]]