个人工具

“UbuntuHelp:Netbeans”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(New page: {{From|https://help.ubuntu.com/community/Netbeans}} {{Languages|php5}} Parent page: Programming Applications The [http://www.netbeans.org/products/ide/ NetBe...)
 
第18行: 第18行:
 
  cd <your_download_dir>
 
  cd <your_download_dir>
 
  chmod +x <downloaded_file>
 
  chmod +x <downloaded_file>
</nowiki></code>
+
</nowiki></pre>
  
 
To install system-wide installation, run the file with sudo and follow the instruction.
 
To install system-wide installation, run the file with sudo and follow the instruction.
 
<pre><nowiki>
 
<pre><nowiki>
 
  sudo ./<downloaded_file>
 
  sudo ./<downloaded_file>
</nowiki></code>
+
</nowiki></pre>
  
 
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.
 
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><nowiki>
 
<pre><nowiki>
 
  ./<downloaded_file>
 
  ./<downloaded_file>
</nowiki></code>
+
</nowiki></pre>
  
 
Note: If Netbeans is unable to find JDK try appending -is:javahome /usr/lib/jvm/java-* to the install command.
 
Note: If Netbeans is unable to find JDK try appending -is:javahome /usr/lib/jvm/java-* to the install command.
第38行: 第38行:
 
<pre><nowiki>
 
<pre><nowiki>
 
  sudo chown -R <your_user>:<your_user> <SUNWappserver_install_dir>/domains/domain1
 
  sudo chown -R <your_user>:<your_user> <SUNWappserver_install_dir>/domains/domain1
</nowiki></code>
+
</nowiki></pre>
  
 
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".
 
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".
第48行: 第48行:
 
   cd <copy_destination>/domain1
 
   cd <copy_destination>/domain1
 
   gedit bin/startserv bin/stopserv
 
   gedit bin/startserv bin/stopserv
</nowiki></code>
+
</nowiki></pre>
 
in each file, search the line that looks like
 
in each file, search the line that looks like
 
<pre><nowiki>
 
<pre><nowiki>
 
   INSTANCE_ROOT=<SUNWappserver_install_dir>/domains/domain1
 
   INSTANCE_ROOT=<SUNWappserver_install_dir>/domains/domain1
</nowiki></code>
+
</nowiki></pre>
 
and replace it with
 
and replace it with
 
<pre><nowiki>
 
<pre><nowiki>
 
   INSTANCE_ROOT=<copy_destination>/domain1
 
   INSTANCE_ROOT=<copy_destination>/domain1
</nowiki></code>
+
</nowiki></pre>
  
 
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".
 
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".

2007年5月13日 (日) 12:42的版本

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>

To install system-wide installation, run the file with sudo and follow the instruction.

 sudo ./<downloaded_file>

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.

 ./<downloaded_file>

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.

 sudo chown -R <your_user>:<your_user> <SUNWappserver_install_dir>/domains/domain1

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.

  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

in each file, search the line that looks like

  INSTANCE_ROOT=<SUNWappserver_install_dir>/domains/domain1

and replace it with

  INSTANCE_ROOT=<copy_destination>/domain1

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