锘??xml version="1.0" encoding="utf-8" standalone="yes"?> Netbeans 6.5 M1 宸茬粡鍙戝竷,鏈鏂扮増鏈殑NetBeans 澧炲己浜?jiǎn)璁稿鍔熻?鍚屾椂涔熷紩鍏ヤ簡(jiǎn)璁稿鍊煎緱鏈熷緟鐨勬柊鐗規(guī)? 榪樻湁PHP Groovy Ruby 絳夐兘鏈夊寮? Now the NetBeans IDE supports UNC paths like ""computerName"sharedFolder" . It is possible to install the IDE to UNC like folder and also it is possible to create projects and other resources on UNC paths. A new panel in options dialog which allows to say to NetBeans that files with certain extension should be treated as files with a certain MIME type (see #133773 ). You can add a new extension to the list of modify existing one. If you want to restore default setting for selected extension, you just click the Default button. In connection with the above change there was also added a new Open As... action. It is enabled only for files which are not recognized by the IDE. User can choose one from supplied MIME types and from now on all files with this extension are treated as of choosen MIME type. Certain IDE distributions (e.g. PHP IDE) don't require Java JDK to run on, JRE is enough. Plugin Manager now checks OpenIDE-Module-Package-Dependencies of all modules which user selects to be installed. If the user's IDE is running on JRE and the unsatified package dependency might indicate that JDK is required, user is warned about it and the plugin installation is not allowed. Quickly search for action or type is now easy. Use Ctrl-I. Since NetBeans 6.1 it is possible to control whether JAR/Folder added to project classpath is referenced via absolute or relative path. Now it is also possible to define a global IDE named variable pointing to a folder and use this variable as a base for referring to JARs/Folders. This feature further simplifies project sharing between users. In scenario where a project depends on JARs for which: a named IDE variable can be used. The variables are managed via Tools -> Variable menu item: In above screenshot single variable is defined with these details: When variable based JAR/Folder is added to project classpath you can see its path starting with variable name (and tooltip showing absolute path): Variable based JAR/Fodler is added to classpath via standard means of "Add Jar/Folder" button in classpath customizer (or "Add JAR/Folder" action on project's Libraries node in project's view). Custom file chooser is shown with one new option "Use Variable Path": Just browse for your JAR/Folder and if selected file is under a variable the option gets enabled. Alternatively press "..." button and setup a new variable. If a user opens project with a variable based path and the variable is not defined in user's IDE then standard broken reference warning is shown to advice user to define variable: The Eclipse project import feature facilitates mixed IDE development teams. It allows you to select Eclipse projects from an Eclipse workspace and generate NetBeans projects for them. The generated NetBeans project keeps a link to the original Eclipse project and will update itself after any relevant change: for example, changing the classpath of the Eclipse project. The update is done automatically when the NetBeans project is opened, or can be explicitly requested via a context menu item "Synch with Eclipse" on the project. This is early preview of the Eclipse import feature which will be fully implemented in Milestone 2. (It supersedes the limited Eclipse import feature available in former NetBeans releases on the update center.) We would appreciate feedback and real-life Eclipse projects for testing; best is to use Issuezilla. (component ide , subcomponent eclipse project import ) Support for creating applets that can be deployed via Java Web Start was added to NetBeans IDE. Note: the functionality is available in JDK 1.6.0 update 10. Each application or applet deployed via Java Web Start can specify external resources (usually other JNLP file in internet). Dialog is opened by clicking on 'External Resources' button. Each applet can have number of properties defined in JNLP file, those properties can be defined in dialog that is opened by clicking 'Applet Parameters'. Also you can set applet dimensions in the dialog. Slided-in windows can keep their preferred size instead of being stretched to the whole height/width of the IDE window. (see #135318 ). Some window system features can be turned off by branding of core.windows module. OutlineView is a new replacement for buggy TreeTableView. It supports drag and drop, in-place editing of tree cells, enhanced sorting etc. The data model is fully compatible with TreeTableView. (see #33281 ). API in options.api module has been changed to allow open Options dialog with preselected subcategory (see #109538 ). In your code you can call OptionsDisplayer.getDefault().open("CategoryID/SubcategoryID"); where CategoryID and SubcategoryID are registration names from layer. For selection a panel under Miscellaneous category use OptionsDisplayer.getDefault().open(OptionsDisplayer.ADVANCED+"/SubcategoryID"); . It is possible to drag and drop any text to the Palette window to create a new code snippet. It works for HTML editor palette only at the moment, more document types will follow soon. The NetBeans IDE Early Access for PHP was released in April at the same time as NetBeans 6.1. Milestone 1 of NetBeans 6.5 now contains all features introduced in this release . Next, in NB 6.5 M1, PHP features are a part of the "all-in-one" distribution of NetBeans, so they can be used together with all the other NetBeans features. Of course, there is still the slim PHP edition of NetBeans, targeted for PHP development specifically. See below for more features added in NetBeans 6.5 Milestone 1, that were not present in Early Access. Also, to keep up with the new features added to NetBeans PHP support, make sure to check and bookmark the NetBeans PHP Team Blog . Generate code to connect to a MySQL database and to display the data in a database table. These snippets are available under the Generate Code action [Alt+Insert], just like in the Java editor. Available also for PHP development. Right click the item and select "Find Usages" or hit Alt-F7. This plugin provides ability to check and fix Javadoc comments in your source code. Just select project/package/files and invoke "Source | Analyze Javadoc". Auto comment functionality is back. Show all callers/callees in the search scope of the selected member. You can specify formatting settings individually for each project Code completion improved. Just write first letters of each word in method to get smart code completion. For instance "iL" stands for invokeLater. Encapsulate Fields Refactoring Improved. New options available. Top voted enhancement finally implemented Now the dialog for creating a new database connection does not expect you to know the details of the JDBC URL to open a connection. If you want to modify the URL, however, you can do so, just click on the "Show JDBC URL" checkbox. Changes to the URL are reflected in the fields and vice versa. SQL that has been executed is saved to a file in the userdir and available for viewing in a dialog and also SQL can be selected and reinserted in an existing SQL file. Is now part of the Web & Java EE and Ruby bundles. No need to get the modules from the update center. Code completion is now faster than the earlier version. For efficiency, Java class FQN completion is now a two step process. Most of the times, a user will need only classes defined locally in the project (source classpath). Hence the first CTRL+SPACE will list only the items in the source classpath, as shown below: If the user wishes to add an item not in the source classpath, he can press CTRL+SPACE again. Also, if the typed prefix does not match any local item, the completion will automatically switch to show all items instead of just local items. A Go to Spring Bean dialog is similar to the Go to Type dialog and will allow the user to quickly navigate to a given Spring Bean definition by it's name. The user selects the main menu item Navigate | Go to Spring Bean... or the keyboard short cut Alt + Shift + B to invoke the Go to Spring Bean dialog. When refactoring Java Bean property getters and setters, the corresponding usages in the Spring XML Configuration files are also modified. . . The editor support for both JSF Configuration Files and JSF JSP Pages are both improved. The improved features include: Code Completion, Hyperlink, Refactoring, and Find Usage. More details can be found at Editor Support in JSF Configuration Files and JSP Files . In NetBean 6.5, the Entity Classes from Database wizard has one additional panel to allow the user to configure the following mapping options: The panel is at the last step of the wizard. It is optional. NetBeans Development is migrating UML to the NetBeans Visual Library. The majority of the planned features are now implemented in the release trunk and the Development is focused on stabilizing the code for release. The new UML will be available in M2. Please see UML Current Projects for additional information. Mobility Data binding provides a simple and consistent way for applications to present and interact with data in the Visual Designer. It utilizes the Databinding libraries available in Netbeans Mobility. New custom component DataSet which provides data for UI components. Supported components in Milstone 1: Databinding support in the custom property editors: Generated code for empty DataSet: Custom Component Support helps to create the Visual Mobile Designer Custom Components. It generates all of the necessary Custom Component infrastructure including: Module project Infrastructure, components descriptors and producers as well the layer.xml file. New Project Custom Component wizard. Generated project and classes with one component descriptor and one producer. Add Mobile Custom Component wizard. Full description of this feature i available here: Custom Components API Project Support - DRAFT Motivation is to extend group of existing SVG components to provide better support for creation of compelling UI on mobile platforms using SVG technology. New components available in the SVG library: SVG Components in action: This is a summary description for the new Multithreaded Debugging Support that is available in M1 NB 6.5. These bits have been done as a first phase of the overall NB debugger redesign effort, which goal is to significantly improve the debugging workflow and usability. From the technical perspective, the Debug view is organized as (in general) a list of sessions, having each session as a list of threads, each suspended thread than expandable to its call stack and more. Debug view is customizable via context options only showing typically needed info by default. With the 'Suspend Table' switched on, any thread can be resumed/suspended by one click on the dedicated button. If there is the debugger counter displayed in the editor and another thread encounters a breakpoint, the current thread will not be automatically switched. Instead, a non-modal panel is displayed in the bottom of Debugging view informing that there are new breakpoint hits waiting; there is also a drop-down button switching the debugger to the next (or selected) breakpoint hit. Having this non-modal notification, users are allowed to finish their debugging of current thread (e.g. expression evaluation) and switch to next breakpoint hit when it fits to the workflow. In order to improve multithreaded debugging, we decided to change the way how debugger manages debuggee threads. The main issue related to current model (NB 6.1 and older) is likely the fact that any step resumes all threads regardless there are threads intentionally suspended by the user or not. This can be limiting e.g. in case of debugging race conditions or deadlock issues. The natural solution to this problem is to resume only the current thread leaving other threads suspended if they are (may have happened via breakpoints or Suspend action). Obviously, this change needs the default breakpoint to suspend only the breakpoint thread, otherwise stepping could lead to so-called Deadlock Caused by Debugger. Current Model Summary (NB 6.1 and older): New Model Summary: When you select a ButtonGroup or some component in a ButtonGroup then the GUI builder shows you which components belong into this group. If you use JDK 6 Update 10 then you can preview your form in the new Nimbus look and feel. We have made this preview more reliable and accurate (within the limits of javax.swing.UIManager design). Besides the design preview you can also set the Nimbus look and feel for runtime - this is easily possible for Desktop Java Application projects in the Project Properties window (go to the Desktop App panel). New TreeModel property editor allows you to prototype your JTree easily. We rewrote property editors for ListModel and ComboBoxModel. It is much easier to use them by now. A new wizard allows for the creation of RESTful, JSR311-based services directly from database tables. This facility is in addition to the wizard that creates services from JPA entities. Web Services nodes in the Services tab of Netbeans 6.5 support Drag-n-drop to Php files as shown below. Code completion accuracy is much improved in milestone 1 compared to NetBeans 6.1. There are very few known cases where an incorrect choice is presented. So the known "inaccuracy rate" is nearly 0. There are known situations where valid choices are not presented to the user. For a range of mid to large scale applications those cases (where valid choices are not shown) is under 5%. Work to further improve accuracy is ongoing. Show all callers/callees of the selected function. Direct call graph: Reverse call graph: C/C++ editors highlights basic errors. Semantic highlighting for typedefs, class fields and function names was added. NetBeans6.5 M1 浼楀鏈熷緟鐨勭壒鎬т竴瑙堣〃!
鍏朵腑鎴戞瘮杈冨枩嬈㈢殑鏄疍ataBase 鐨勬敼榪?Eclipse 欏圭洰瀵煎叆鍙樺緱姣斾互鍓嶆洿鏂逛究浜?鍙互姝g‘鐨勫尯鍒哤eb欏圭洰
鍜屾櫘閫氶」鐩?榪樻湁Spring Hibernate 澧炲己. GUI 涓柊澧炰簡(jiǎn)JDK1.6 u10 涓殑look&feel 鍙浣犵敤鐨勬槸 JDK1.6 u10
灝卞彲浠ヤ嬌鐢ㄨ繖涓瑙傞瑙?鏁版嵁緇戝畾鍔熻兘涔熸敼榪涗簡(jiǎn)! 鍏ㄦ柊鐨勫綰跨▼Debug 鍔熻兘鏀寔!
JavaScript 涔熷姞鍏ョ殑Debug鍔熻兘,榪樺姞鍏ヤ簡(jiǎn)濂藉嚑涓狫avascript 搴?鍍廕Query ,Yahoo ui dojo 絳夌瓑!
榪樻柊澧炰簡(jiǎn)涓涓?"椹煎嘲鎷煎啓" 浠g爜琛ュ叏鍔熻兘. 寰堟湁鎰忔?
JavaEE 鐨刲ib path 涔熷彉鎴愪簡(jiǎn)鍙彉鐨勪簡(jiǎn).姝ゅ榪樺鍔犱簡(jiǎn)蹇熸悳绱㈠姛鑳? 鏇存柟渚挎悳绱? 榪樻湁濂藉涓壒鎬у憿!
鍏蜂綋鐪嬩笅闈㈢殑浠嬬粛! 鑻辨枃澶浜?jiǎn)灏变笉缈昏瘧浜?jiǎn) 澶у鑷繁鐪嬪惂!
UNC paths on Windows File Associations options panel and Open As... action
Running some IDE distributions on JRE
QuickSearch
Variable based paths in J2SE/J2EE projects
Eclipse project import and synchronization
Enhanced Java Web Start support
Platform
Sliding windows support original window sizes
Possibility to configure some Window System properties for applications based on Platform
TreeTableView replacement introduced
Opening Options dialog with preselected subcategories
Support allowing a user to drop a text into the palette
PHP
Features first introduced in Early Access for PHP
Database-related code snippets
Find Usages
Multiple project configurations
Ajax
JavaScript Debugger
JavaScript Library Manager
Bundled JavaScript Libraries
Java
Javadoc Analyzer
Call Hierarchy
Formatting Settings per Project
CamelCase code completion
Improved Encapsulate Fields Refactoring
Option to remove whitespace at end of line
Groovy
Editor
Java SE Project Integration
Database
Improved New Connection dialog
SQL history dialog
Server Support
GlassFish V3 integration module.
Web frameworks (Spring, Hibernate, JSF, JSF CRUD Generator, JPA)
Spring
Hibernate (Available via Development Update center for M1)
.
JSF, JSF CRUD Generator
Example
Code Completion UI
Managed Beans
Resource Bundles
JSF Configuration Files Example
File opened
<managed-bean-class>foo.ManagedBean </managed-bean-class>
the Java file ManagedBean.java under package foo
<to-view-id>/Page2.jsp </to-view-id>
the JSF page file Page2.jsp under the context root
JSF JSP Pages Example
File opened
<h3> <h:outputText value =" #{ManagedBean .min}" /></h3>
the JSF configuration file on position where the managed bean been defined
<h3> <h:outputText value =" #{ManagedBean.min }" /></h3>
the appropriate Java file on position where the getter for the property been defined
Example
Refactoring UI
Managed Beans
Folder / Package
Example
Usages UI
Managed Beans
JPA
UML
Mobility
Databinding
Custom Component Support
New SVG Support
Debugger
New Multithreaded Debugging Support
Debugging Window
In order to improve UI for multithreaded debugging and also willing to reduce the number of debugger views, a new (unifying) debugger view is introduced. This view (referred as Debugging View) integrates current Sessions, Threads and Call Stack views being displayed in the Explorer group by default. Current Thread Chooser
When doing a multithreaded debugging, it is often needed to quickly switch between particular threads; e.g. when doing a stepping sequence in two threads alternately. For such purpose we introduce a new action--Current Thread Chooser (CTRL+8). In fact, it is an analogy to application switching common in OS environment. With this feature, it is really straightforward to revisit any thread for debugging or switch to a particular thread for the first time. 'Other Thread(s) Suspended Here' Gutter Navigation
Anytime the debugger displays the thread icon in the editor gutter, the user is informed that there is/are one or more suspended non-current thread(s) at this line. The list of these threads can be seen in the icon tooltip, and it is also possible to switch debugging to any of these threads via the context menu. Strictly speeking, it is the Source->Threads navigation available in the editor gutter. Deadlock Detection
The debugger automatically searches for deadlock among all suspended threads. When a deadlock is detected, a non-modal notification is displayed having emphasized involved threads. Detailed monitor info is also available displayed in dedicated monitor nodes. New Threading Model
GUI Builder
ButtonGroup visualization
Preview in Nimbus look and feel
TreeModel editor
ListModel and ComboBoxModel usability enhancements
Web Services
RESTful services from database
Consuming popular SaaS services in Php
C/C++
Code completion accuracy
Call Graph
Error highlighting and more types of semantic highlighting
Ruby
]]>
鏁憡錛?br />
------------------------------------------------------------
鏈枃浣滆呭笇鏈涙湰鏂囧彲浠ュ湪緗戠粶鍙?qiáng)鋼Q浣曞獟浣撹繘琛屼換浣曞艦寮忕殑浼犳挱銆佸
鍒躲佸紩鐢ㄣ佷慨鏀癸紝鍦ㄦ榪囩▼涓淇濈暀姝ゆ暚鍛婂唴瀹廣?br />
璋㈣阿錛?br />
popo
------------------------------------------------------------
NetBeans鏄熀浜嶢NT榪涜欏圭洰鐨刡uild鍜宺un鐨勶紝鎵浠ユ垜浠彲浠ユ柟渚跨殑鍔犲叆鑷繁鐨則arget瀵瑰師鏈夐」鐩繘琛屾墿灞曘?br />
鍚姩NetBeans錛屾墦寮浠ュ墠鍐欑殑SimpleWebSite_dao欏圭洰錛屽洜涓烘垜浠鍋氱殑鏄埄鐢╔Doclet鐢熸垚Hibernate鐨?.hbm.xml(ORM)鏂囦歡錛屾墍浠ュ皢XDoclet鐨勬墍鏈塉ar鍖呰В鍘嬪埌l(fā)ib\xdoclet-1.3-SNAPSHOT鐩綍涓嬶紝涓嶇敤鍦ㄩ」鐩腑寮曠敤XDoclet鐨勫寘錛屽洜涓烘垜浠槸瑕侀氳繃淇敼Build鏂囦歡鏉ュ紩鐢ㄨ繖浜涘寘銆?br />
閫夋嫨“Files”紿楀彛錛屽睍寮SimpleWebSite_dao欏圭洰銆?br />
鎵撳紑build.xml鏂囦歡錛岀湅璇ユ枃浠朵腑鐨勬敞閲婏紝澶ф灝辨槸璁睳etBeans涓烘垜浠敓鎴愮殑build鏂囦歡鏄痭bproject/build-impl.xml錛宐uild.xml宸茬粡import浜?jiǎn)build-impl鏂囦歡錛屽鏋滄垜浠兂鍔犲叆鑷繁鐨則arget鎴栬呭鍘熸湁target榪涜淇敼錛屽彧瑕佹敼鍔╞uild鏂囦歡灝卞彲浠ャ?br />
鐢∟etBeans緙栬緫XML鏂囦歡寰堟柟渚匡紝鍙互瀵筙ML鏂囦歡榪涜媯(gè)鏌ュ拰鏍¢獙錛屽茍涓旇繕鏈変唬鐮佹彁紺哄強(qiáng)琛ラ綈鐨勫姛鑳斤細(xì)錛夈傚鑸獥鍙f洿鏄負(fù)鎴戜滑鏌ョ湅XML鍐呭緇撴瀯鎻愪緵浜?jiǎn)鏋佸ぇ鐨勬柟渚裤?br />
鍦╞uild.xml涓姞鍏ヤ互涓嬪唴瀹癸細(xì)
<property name="lib.dir" location="../lib" />
<property name="xdoclet.dir" location="../lib/xdoclet-1.3-SNAPSHOT" />
<path id="xdoclet.classpath">
<fileset dir="${lib.dir}" includes="*.jar"/>
<fileset dir="${xdoclet.dir}" includes="*.jar"/>
</path>
<!-- =================================================================== -->
<!-- The "hibernatedoclet" target generates Hibernate mapping files -->
<!-- based on XDoclet marked-up Plain Old Java Object (POJO) -->
<!-- =================================================================== -->
<target name="hibernatedoclet" depends="compile" unless="hibernatedoclet.unnecessary"
description="Generate Hibernate mapping files">
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask"
classpathref="xdoclet.classpath"/>
<!-- generate hibernate files -->
<hibernatedoclet destdir="${build.classes.dir}" mergedir="${build.classes.dir}"
excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}"
force="${xdoclet.force}">
<fileset dir="src"/>
<hibernate validatexml="true" version="3.0"/>
</hibernatedoclet>
</target>
鐢ㄥ彸閿偣build.xml鏂囦歡錛屽湪“Run target”涓紝浼?xì)鐪嬪埌鎴戜滑鏂板姞鐨則arget->“hibernatedoclet”銆?br />
鐜板湪鍐欎竴涓狿OJO錛岀敤榪欎釜target鐢熸垚.hbm.xml鏂囦歡銆?br />
New 涓涓狫ava Class Customer錛堣繖涓被鐨勪唬鐮佹槸浠庣綉涓婃嫹璐濇潵鐨勶紝鍥犱負(fù)鎴戝XDoclet榪樹笉澶啛鎮(zhèn)夛級(jí)錛?br />
package hibernate;
import java.util.Set;
import java.util.Collections;
/**
* @author roson
* @since 1.0
* @version 1.0
* @hibernate.class tables="customers"
*/
public class Customer {
/**This customer's identifier field.
*/
private long id;
/**This customer's name field.
*/
private String name;
/**The customer's orders set.
*/
private Set orders=Collections.EMPTY_SET;
/**The default construtor for Hibernate to instantiate with.
*/
public Customer() {}
/**The getter method for this Customer's identifier.
*
* @hibernate.id generator-class="native"
*/
public long getId() {
return id;
}
/**The setter method for this Customer's identifier.
*/
public void setId(long id) {
this.id=id;
}
/**The getter method for this Customer's name.
*
* @hibernate.property
*/
public String getName() {
return name;
}
/**The setter method for this Customer's name.
*/
public void setName(String name) {
this.name=name;
}
/**The getter method for this Customer's orders.
*
* @hibernate.set role="orders"
*
* @hibernate.collection-key column="customer_id"
*
* @hibernate.collection-one-to-many class="Order"
*/
public Set getOrders() {
return orders;
}
/**The setter method for this Customer's orders.
*/
public void setOrders(Set orders) {
this.orders=orders;
}
}
鐜板湪鍙抽敭鐐筨uild.xml鏂囦歡錛屽湪“Run target”涓紝閫?#8220;hibernatedoclet”錛孊UILD SUCCESSFUL銆?br />
鍦╞uild\classes\hibernate鐩綍涓嬩細(xì)鐪嬪埌緙栬瘧鍚庣殑Customer.class鏂囦歡鍜孹Doclet鐢熸垚鐨凜ustomer.hbm.xml銆?br />
涓轟簡(jiǎn)鏂逛究錛屾垜浠繘涓姝ヤ慨鏀筨uild.xml鏂囦歡錛屽皢build-impl.xml涓殑“jar”榪欎釜target澶嶅埗綺樿創(chuàng)榪囨潵錛屽茍鏀逛負(fù)浠ヤ笅鍐呭錛?br />
<target name="jar" depends="init,hibernatedoclet,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
鎴戝彧鎶奷epends涓殑compile鏀逛負(fù)浜?jiǎn)hibernatedoclet錛岃繖鏍峰湪緙栬瘧鍚庡拰鎵撳寘鍓嶇殑鏃跺欙紝浼?xì)鐢熸?.hbm.xml鏂囦歡銆?br />
鐜板湪鐨刡uild.xml鏂囦歡鍐呭濡備笅錛?br />
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="SimpleWebSite_Dao" default="default" basedir=".">
<description>Builds, tests, and runs the project SimpleWebSite_Dao.</description>
<import file="nbproject/build-impl.xml"/>
<property name="lib.dir" location="../lib" />
<property name="xdoclet.dir" location="../lib/xdoclet-1.3-SNAPSHOT" />
<path id="xdoclet.classpath">
<fileset dir="${lib.dir}" includes="*.jar"/>
<fileset dir="${xdoclet.dir}" includes="*.jar"/>
</path>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="SimpleWebSite_Dao-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
<!-- =================================================================== -->
<!-- The "hibernatedoclet" target generates Hibernate mapping files -->
<!-- based on XDoclet marked-up Plain Old Java Object (POJO) -->
<!-- =================================================================== -->
<target name="hibernatedoclet" depends="compile" unless="hibernatedoclet.unnecessary"
description="Generate Hibernate mapping files">
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask"
classpathref="xdoclet.classpath"/>
<!-- generate hibernate files -->
<hibernatedoclet destdir="${build.classes.dir}" mergedir="${build.classes.dir}"
excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}"
force="${xdoclet.force}">
<fileset dir="src"/>
<hibernate validatexml="true" version="3.0"/>
</hibernatedoclet>
</target>
<target name="jar" depends="init,hibernatedoclet,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
</project>
鍦≒rojects紿楀彛錛岄?#8220;Build Project”鎴栬?#8220;Clean and Build Project”錛?br />
浼?xì)鐪嬪埌鐢ㄥ堫C簡(jiǎn)鎴戜滑淇敼鍚庣殑jar榪欎釜target榪涜鐨勭紪璇戝拰鎵撳寘銆?br />
XDoclet鐨勫姛鑳藉緢寮哄ぇ錛屾垜浼?xì)杈瑰杈瑰湪鎴戠殑椤圭洰涓埄鐢ㄥ畠锛屽彲浠ョ渷鍘诲緢澶毦~栫爜宸ヤ綔銆?br />
鐪婣ppfuse鐨刡uild.xml錛屾暟鎹簱鐨勮〃鏄敤Hibernate鎻愪緵鐨凷chemaExportTask宸ュ叿鐢熸垚鏁版嵁搴撳緩琛ㄧ殑SQL錛屾垜浠篃鏉ョ収鍋氾紝榪欐牱鍙鍦ㄥ啓POJO鏃跺姞涓婃敞閲婏紝鐢ˋNT鐨則arget灝卞彲浠ョ敓鎴?.hbm.xml鏂囦歡鍜屽垱寤烘暟鎹〃鐨凷QL璇彞銆傛柟渚垮惂錛?br />
瀵筨uild.xml榪涜淇敼錛屾妸鐢熸垚*.hbm.xml鏂囦歡鐨勭洰鏍囪礬寰勬敼涓篠RC鐩綍錛屼笉鍐峝epends="compile"錛屾敼涓哄湪jar鐨勬椂鍊欏厛“hibernatedoclet”鍐?#8220;compile”錛屽鍔燾reate_tables_sql鐨則arget錛屼慨鏀瑰悗鐨刡uild.xml鏂囦歡涓猴細(xì)
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="SimpleWebSite_Dao" default="default" basedir=".">
<description>Builds, tests, and runs the project SimpleWebSite_Dao.</description>
<import file="nbproject/build-impl.xml"/>
<property name="src.dir" location="./src" />
<property name="lib.dir" location="../lib" />
<property name="xdoclet.dir" location="../lib/xdoclet-1.3-SNAPSHOT" />
<path id="xdoclet.classpath">
<fileset dir="${lib.dir}" includes="*.jar"/>
<fileset dir="${xdoclet.dir}" includes="*.jar"/>
</path>
<!--
There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:
-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-jar: called before JAR building
-post-jar: called after JAR building
-post-clean: called after cleaning build products
(Targets beginning with '-' are not intended to be called on their own.)
Example of inserting an obfuscator after compilation could look like this:
<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>
For list of available properties check the imported
nbproject/build-impl.xml file.
Another way to customize the build is by overriding existing main targets.
The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
-init-macrodef-debug: defines macro for class debugging
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
An example of overriding the target for project execution could look like this:
<target name="run" depends="SimpleWebSite_Dao-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>
Notice that the overridden target depends on the jar target and not only on
the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
nbproject/build-impl.xml file.
-->
<!-- =================================================================== -->
<!-- The "hibernatedoclet" target generates Hibernate mapping files -->
<!-- based on XDoclet marked-up Plain Old Java Object (POJO) -->
<!-- =================================================================== -->
<target name="hibernatedoclet" unless="hibernatedoclet.unnecessary"
description="Generate Hibernate mapping files">
<taskdef name="hibernatedoclet"
classname="xdoclet.modules.hibernate.HibernateDocletTask"
classpathref="xdoclet.classpath"/>
<!-- generate hibernate files -->
<hibernatedoclet destdir="${src.dir}" mergedir="${src.dir}"
excludedtags="@version,@author" addedtags="@xdoclet-generated at ${TODAY}"
force="${xdoclet.force}">
<fileset dir="${src.dir}"/>
<hibernate validatexml="true" version="3.0"/>
</hibernatedoclet>
</target>
<!-- =================================================================== -->
<!-- The "create_tables_sql" target generates the database schema and -->
<!-- creates tables based on the mapping files -->
<!-- =================================================================== -->
<target name="create_tables_sql" depends="hibernatedoclet" description="creates database tables">
<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
classpathref="xdoclet.classpath"/>
<schemaexport quiet="yes" text="true" drop="no" delimiter=";"
properties="src/database.properties" output="../database/sql/create-tables.sql">
<fileset dir="${src.dir}" includes="**/*.hbm.xml"/>
</schemaexport>
</target>
<target name="jar" depends="init,create_tables_sql,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
</project>
榪欐牱錛屾瘡嬈?#8220;Build Project”鎴栬?#8220;Clean and Build Project”鏃訛紝閮戒細(xì)鍏堝湪婧愮▼搴忕洰褰曞垱寤?.hbm.xml鏂囦歡錛屽啀鍦?./database/sql鐩綍涓嬬敓鎴愬垱寤烘暟鎹〃鐨凷QL鏂囦歡錛屽啀榪涜緙栬瘧錛屾墦鍖呫?br />
鐢ㄤ笂闈㈢殑紺轟緥鏂囦歡鏈夊嚑涓棶棰?br />
1.Customer綾諱腑 * @hibernate.class tables="customers"搴旇鏄?* @hibernate.class table="customers"錛?br />
2.鐢熸垚鐨凜ustomer.hbm.xml鏂囦歡“create_tables_sql”鏃跺け璐ワ紝鎻愮ず淇℃伅涓猴細(xì)
D:\ProjectNetBeans\SimpleWebSite\SimpleWebSite_Dao\build.xml:107: Schema text failed: Could not read mapping document from file: D:\ProjectNetBeans\SimpleWebSite\SimpleWebSite_Dao\src\hibernate\Customer.hbm.xml
BUILD FAILED (total time: 4 seconds)
涓哄瓧孌靛姞涓婃暟鎹被鍨嬶紙type="java.lang.Long"錛夊悗鍙互璇誨彇鏂囦歡錛屼絾榪樻槸澶辮觸錛?br />
D:\ProjectNetBeans\SimpleWebSite\SimpleWebSite_Dao\build.xml:107: Schema text failed: Association references unmapped class: Order
鍥犱負(fù)瀵筙Doclet涓嶇啛錛屽Hibernate鐨勯厤緗篃蹇繕璁板樊涓嶅浜?jiǎn)锛屾墍浠ョ渷鐐逛簨鍎匡紝鍏堟妸Order灞炴у幓鎺夈?br />
“Clean and Build Project”錛屽搱鍝堬紝鐪嬬湅錛?.hbm.xml鏂囦歡鍜屽緩鏁版嵁搴撹〃鐨凷ql璇彞閮界敓鎴愬暒銆?br />
涓嶈繃榪樻病鏈夎瘯榪嘍ebug絳塼arget錛屽鏋滈偅浜泃arget渚濊禆鐢熸垚鐨?.hbm.xml鏂囦歡鐨勮瘽錛岃繕瑕佸鐩稿簲鐨則arget鍔犱笂depends...
鍓╀笅鐨勫氨鏄澶氱湅鐪媂Doclet鍜孒ibernate閰嶇疆鐨勬枃妗e暒銆?
]]>
涓銆佹ā鍧?br />
紱佺敤娌℃湁浣跨敤鐨勬ā鍧楋細(xì)Tools銆婸lugins銆婭nstalled
閫夋嫨涓嶇敤鐨勬ā鍧楋紝Deactivate銆?br />
浜屻?span class="hilite2">閰嶇疆
緙栬緫鏂囦歡錛?br />
$NB_HOME/etc/netbeans.conf
淇敼 netbeans_default_options閫夐」錛?br />
netbeans_default_options="xxxxxxxxxxxxxxx"
鍏朵腑錛屼慨鏀癸紙-J-Xms鐨勬暟鍊間緷鍐呭瓨鑰屽畾錛屼笅闈㈡槸512MB鐨勪緥瀛愶級(jí)
-J-Xms64m -J-XX:PermSize=32m -J-XX:MaxPermSize=192m
鍐嶅湪鏈熬鍙屽紩鍙峰墠鍔犲叆錛堟敞鎰忚棣栨湁涓┖鏍鹼級(jí)
-J-DuseGtk=true -J-Xverify:none -J-Djava.net.preferIPv4Stack=true
鍏朵腑“-J-DuseGtk=true”鏄負(fù)浜?jiǎn)鐣岄潰鋴社敤GTK椋庢牸錛岃繖鏍鳳紝瀛椾綋宸蹭笉鐢?span class="hilite2">閰嶇疆浜?jiǎn)銆傚綋鐒跺墠鎻愭槸鐢↗DK6銆傝孎edora涓嶇敤鍔犺繖涓欏癸紝灝辮嚜鍔ㄤ嬌鐢℅TK浜?jiǎn)锛寴q欐槸鍥犱負(fù)Netbeans鐨勬敮鎸佸垪琛ㄤ腑娌℃湁ubuntulooks涓婚寮曟搸
榪欐槸鍦ㄧ増鏈?.0beta2涓婄殑浼樺寲銆傜粡鎴戝疄楠岋紝澶уぇ鎻愰珮浜?jiǎn)NetBeans鐨勫惎鍔ㄩ熷害.
1錛屼慨鏀硅嫳鏂噉etbeans鐣岄潰瀛椾綋澶у皬錛屼慨鏀?Netbeans_home%\etc\netbeans.conf
鍦╪etbeans_default_options閲屽姞涓?--fontsize 12
2錛屼慨鏀笿VM鍐呭瓨閰嶇疆錛堟湰鏈哄唴瀛?G錛屼笉鍚屽唴瀛樺ぇ灝忎笉鍚岃緗級(jí)
鍦╪etbeans_default_options閲屽姞涓?-J-Xmx512m錛屽悓鏃朵慨鏀?J-Xms256m銆?br />
銆愯鏄庛?J-Xms32m
姝よ緗敤浜庨氱煡 Java 铏氭嫙鏈哄皢鍏跺垵濮嬪爢澶у皬璁劇疆涓?32 MB銆傞氳繃閫氱煡 JVM 瀹冩渶鍒濆簲璇ヤ負(fù)鍫嗗垎閰嶅灝戝唴瀛橈紝鎴戜滑鍙互闃叉瀹冮殢鐫 IDE 浣跨敤鏇村鐨勫唴瀛樿屽皢鍫嗗澶с?
銆愯鏄庛?J-Xmx128m
姝よ緗敤浜庢寚瀹?Java 铏氭嫙鏈哄簲璇ョ敤浜庡爢鐨勬渶澶у唴瀛樸傚姝ゆ暟鍊艱緗‖鎬т笂闄愭剰鍛崇潃 Java 榪涚▼涓嶈兘浣跨敤姣斿彲鐢ㄧ殑鐗╃悊 RAM 鏇村鐨勫唴瀛樸傚浜庡叿鏈夋洿澶氬唴瀛樼殑緋葷粺鍙互鎻愬崌姝ら檺鍒?- 128 MB 璁劇疆鏈夊姪浜庣‘淇?IDE 鍦?256MB 鐨勭郴緇熶笂鍙潬鍦版墽琛屾搷浣溿傛敞鎰忥細(xì)涓嶈灝嗘鍊艱緗負(fù)鎺ヨ繎鎴栧ぇ浜庣郴緇熶腑鐨勭墿鐞?RAM 鏁幫紝鍚﹀垯鍦ㄤ富瑕佸洖鏀惰繃紼嬩腑灝嗗鑷撮綣佺殑浜ゆ崲絀洪棿鎿嶄綔銆?/p>
3錛屽湪netbeans_default_options閲屼慨鏀?-J-XX:PermSize=20m
榪欐槸涓涓緝鐗規(guī)畩鐨?JVM 寮鍏籌紝浣嗗畠涔熺緝鐭簡(jiǎn)鍚姩鏃墮棿銆傛璁劇疆鐢ㄤ簬璋冩暣鍐呭瓨涓?#8220;姘鎬箙鍖哄煙”錛堝湪榪欓噷淇濆瓨綾伙級(jí)鐨勫ぇ灝忋傜敱浜庢垜浠煡閬撴墍鏈?IDE 綾誨潎鍗犵敤鐗瑰畾鏁伴噺鐨勫唴瀛橈紝鍥犳鎴戜滑鍚?JVM 鎻愮ず瀹冨皢闇瑕佺殑鍐呭瓨鏁伴噺銆傛璁劇疆娑堥櫎浜?jiǎn)璁稿绯痪l熶笂鍚姩榪囩▼涓殑涓昏鍨冨溇鍥炴敹浜嬩歡銆係unONE Studio 鎴栧寘鎷洿澶氭ā鍧楃殑鍏朵粬 IDE 鐨勭敤鎴峰彲鑳藉笇鏈涘皢姝ゆ暟鍊艱緗緱鏇撮珮浜涖?/p>
4錛屽湪netbeans_default_options閲屽姞涓?J-Xverify:none
姝ゅ紑鍏崇敤浜庡叧闂?Java 瀛楄妭鐮侀獙璇侊紝浠庤屽姞蹇被鍔犺澆錛屼互鍙?qiáng)娑堥櫎鍦ㄥ惎鍔q囩▼涓粎涓洪獙璇佺洰鐨勮屽姞杞界被鐨勯渶瑕併傛寮鍏沖皢鏄捐憲緙╃煭鍚姩鏃墮棿銆?/p>
5錛屽湪Tools-Plugins-installed閲岄潰鎶婁笉闇瑕佺殑妯″潡鍘繪帀
鎴戣繖閲屽幓鎺変簡(jiǎn) Glashfish錛汮SF錛汣VS錛汼ubversion絳夈傞熷害灝卞緱鍒板緢澶ф彁楂樹簡(jiǎn)銆傚綋鐒跺鏋滀綘鐨勫紑鍙戦渶瑕佽繖浜涙ā鍧楀氨涓嶉渶瑕佸幓鎺変簡(jiǎn)銆?/p>
6錛屼慨鏀圭紪杈戝櫒閰嶇疆
鎶婃墍鏈夌殑Javadoc鑷姩寮瑰嚭紿楀彛鍘繪帀錛屾妸鎵鏈夎嚜鍔ㄥ畬鎴愬歡鏃惰緗負(fù)0錛屾妸鎵鏈夎嚜鍔ㄥ畬鎴愬ぇ灝忓啓鏁忔劅鍘繪帀銆?br />
娉細(xì)鍦╪etbeans6鐨凧AVA浠g爜緙栬緫鍣ㄨ緗噷闈㈤粯璁ゆ病鏈夎緗唬鐮佽嚜鍔ㄥ畬鎴愮殑寤舵椂璁劇疆浜?jiǎn)銆傚彲浠ヨ嚜宸辨墜鍔ㄥ姞鍏ュ埌閰嶇疆鏂囦歡C:\Documents and Settings\%USER_NAME%\.netbeans\6.0beta2\config\Editors\text\x-java涓嬬殑properties.xml錛屽姞鍏?br />
<property class="java.lang.Integer" name="completion-auto-popup-delay" value="1"/>
銆愯鏄庛?preperties.xml鏂囦歡榛樿涓嶅瓨鍦紝鍙湁鍦ㄤ綘淇敼浜?jiǎn)缂栬緫鍣ㄩ厤缃互鍚庢墠浼?xì)鍑虹幇榪欎釜鏂囦歡
鐜璁劇疆
榪欎竴姝ユ槸鍦∟etBeans IDE鍐呴儴璁劇疆銆傚湪 宸ュ叿--閫夐」--楂樼駭閫夐」錛?br />
鍦?緙栬緫鍣ㄨ緗?涓皢 鏂囨湰騫蟲粦 鍘繪帀錛堜釜浜轟笉鍠滄榪欎釜錛屾繪劅瑙夐変笂鍚庢湁浜涘瓧姣嶈竟緙樻殑錛?br />
鍦?緙栬緫鍣ㄨ緗?-java緙栬緫鍣ㄨ緗?涓皢 鑷姩瀹屾垚寮瑰嚭紿楀彛寤舵椂 璁劇疆涓?,閫変腑鑷姩寮瑰嚭javadoc紿楀彛
鍦?JAVA婧愪唬鐮?涓皢 閿欒鏍囨敞闄愬埗 鍜?鑷姩瑙f瀽寤惰繜 璁劇疆涓?,鍙﹀ 緙虹渷緙栫爜 榛樿鏄疓BK 寤鴻鍙互鏀規(guī)垚 UTF-8.浠ヤ究鍦ㄧЩ妞嶆簮浠g爜鍒伴潪GBK緙栫爜騫沖彴鐨勬椂鍊欎腑鏂囨敞閲婅兘姝g‘鏄劇ず銆?br />
鍦?IDE閰嶇疆--寤鴻妗嗘灦 涓?鐨?涓歡榪熸椂闂撮兘鏀逛負(fù) 1
瀛椾綋璁劇疆
榛樿鎯呭喌涓嬬殑NetBeans鐨勫瓧浣撶湡鐨勫緢闅劇湅,鍙互灝嗛潪娉ㄨВ鐨勫瓧浣撲笌瀛楃涓茬被鍨嬬殑鍏ㄩ儴璁劇疆涓篊ourier New 14鍙峰瓧浣擄紝娉ㄩ噴涓庡瓧絎︿覆綾誨瀷鐨勫瓧浣撹緗負(fù)瀹嬩綋 13鍙楓傝緗畬鍚庢槸涓嶆槸瑙夊緱寰堟紓浜紙涓嶈鎵撳紑 鏂囨湰騫蟲粦 鍔熻兘錛?/p>
1.NetBeans鐣岄潰涓婄殑鏅氬瓧浣撳ぇ灝忥紝鍙互閫氳繃閰嶇疆NetBeans瀹夎鐩綍涓媙etbeans.conf鍚姩鏂囦歡鏉ュ疄鐜幫紝榪欎釜鏂囦歡鍦?lt;NetBeans>/etc鐩綍涓嬨傜己鐪佺殑NetBeans鍦ㄤ嬌鐢⊿wing鐨勭己鐪佸瓧浣擄紝澶у皬涓?1錛岀◢紼嶅珜灝忥紝濡傛灉瑕佹敼鎴?2錛屽彲浠ュ皢鏂囦歡涓殑涓嬮潰涓琛岋細(xì)
netbeans_default_options="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"
鏀規(guī)垚
netbeans_default_options="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true --fontsize 12"
鍙﹀錛屼篃鍙互閫氳繃璁劇疆Swing鐨勪竴涓帶鍒跺瓧浣撶殑緋葷粺灞炴wing.useSystemFontSetting鏉ュ疄鐜幫細(xì)
netbeans_default_options="-J-Dswing.useSystemFontSettings=false -J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"
2.緙栬緫鍣ㄧ殑瀛椾綋鍙互閫氳繃閫夐」璁劇疆鏉ュ疄鐜幫紝鍏蜂綋鏄疶ools->Options->Fonts & Colors錛岃繖鍎垮彲浠ヨ緗寘鍚瓧浣撱佸墠鍚庤儗鏅瓑璁劇疆銆傚垰杞埌NetBeans鏃訛紝鎴戝氨鎸夌収Eclipse鍜孷S2003鍒氳緗簡(jiǎn)涓濂楄緗紝璁劇疆濂戒簡(jiǎn)涔嬪悗鐨凬etBeans鐗瑰埆婕備寒錛屼竴鐐歸兘涓嶈緭緇橢clipse銆?/p>
3.瀛椾綋閿嬌闂錛岃В鍐寵繖涓棶棰橈紝棣栧厛浣犺浣跨敤Java6銆侸ava6鏀寔LCD鍜屽弽璧版牱(anti-alias)瀛椾綋錛屽畨瑁匤ava6鍚庯紝淇敼etc/netbeans.conf璁㎞etBeans浣跨敤Java6銆傞渶瑕佹敞鎰忕殑鏄湪Windows涓嬮渶瑕佹槑紜墦寮鎿嶄綔緋葷粺鐨勫瓧浣撹竟緙樺鉤婊戣緗悗錛屾墠璧蜂綔鐢ㄣ傝緗柟娉曟槸錛屽彸閿偣鍑?yán)L闈紝閫夋嫨澶栬->鏁堟灉->浣跨敤涓嬪垪鏂瑰紡浣垮瓧浣撶殑杈圭紭騫蟲粦->娓呮櫚錛岀劧鍚庡惎鍔∟etBeans灝卞彲浠ヤ簡(jiǎn)銆?/p>
鍙﹀錛屾垜涓漢瑙夊緱NetBeans緙虹渷鐨勫伐鍏鋒爮鎸夐挳澶ぇ錛屽鏋滀綘鍜屾垜鏈夊悓鏍鋒劅瑙夛紝鍙互鍙抽敭鐐瑰嚮宸ュ叿鏍忥紝浠庝笅鎷夎彍鍗曚腑閫夋嫨Small Toolbar Icons銆?/p>
浣犲皢緙虹渷瀛椾綋鏀逛負(fù)DialogInput 12灝卞彲浠ヤ簡(jiǎn)銆?/p>
NetBeans浣跨敤蹇?jī)寰椾簩锛?xì)鍐呭瓨鍜屽瀮鍦炬敹闆嗘満鍒墮厤緗?/p>
NetBeans鐨勭己鐪佺殑鍐呭瓨閰嶇疆鍋忎綆錛屽彧鏈?28M錛屽疄闄呬笂Eclipse鐨勭己鐪侀厤緗負(fù)256M錛屽浜嶯etBeans榪欐牱鎷ユ湁濡傛涔嬪鐨勫姛鑳斤紝鍗存墠浣跨敤128M鏄笉澶悎閫傜殑銆傛浘緇忓湪鍒漢鐨勫崥瀹笂鐪嬪埌錛屾渶浣崇殑鍐呭瓨閰嶇疆搴旇涓虹墿鐞嗗唴瀛樼殑1/3錛屽鏋滃皬浜庤繖涓鹼紝NetBeans灝遍毦浠ュ彂鎸ュ叏鏁堬紝濡傛灉澶т簬榪欎釜鍊煎氨浼?xì)閫犳垚鎿嶄綔緋葷粺鍐呭瓨鎶栧姩銆傚氨NetBeans5.5鏉ヨ錛屽畼鏂圭綉绔欎笂瑙勫畾鐨勬渶灝忓唴瀛樻槸512M錛屾帹鑽愬唴瀛?G錛岃繖涓鐐瑰拰鍏朵粬Java IDE涓鏍鳳紝姣斿Eclipse瀹樻柟瑙勫畾鐨勬渶灝忓唴瀛樺眳鐒舵槸1G銆傝繖璁╂垜涓嶅緱涓嶅徆鎭垜浠殑鐢?shù)鑴戝疄鍦ㄥお钀藉悗浜?jiǎn)銆傛垜瀹墮噷鐨勫伐浣滄満鎵?56M錛屽悗鏉ヤ拱浜?12M娣諱笂鍘伙紝鎬誨叡鎵?68M錛屽洜姝ゆ寜鐓?/3鍘熷垯錛屾垜鎶奛etBeans璁劇疆涓?56M銆傚浣曡緗繖涓煎憿錛熷悓鍓嶆枃涓鏍瘋璁劇疆鍚姩鏂囦歡 <NetBeans>/etc/netbeans.conf錛屾墦寮鍚姩鏂囦歡錛屽皢netbeans_default_options涓琛屼腑鐨?J-Xmx閫夐」璁劇疆鎴?56M灝卞彲浠ヤ簡(jiǎn)錛屽涓嬶細(xì)
netbeans_default_options=="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"
浣跨敤NetBeans鐨勭己鐪侀厤緗紝鍦ㄩ暱鏃墮棿鐨勮繍琛屽悗錛屽線寰浼?xì)绐佺剦櫁村兊浣忎簡(jiǎn)锛屾病鏈夊搷搴斿Q岃繖鏄洜涓篔VM緙虹渷鐨勫瀮鍦炬敹闆嗘満鍒朵笉浣跨敤澧為噺寮忓茍琛屾敹闆嗭紝鑰屾槸闅旀柇鏃墮棿鍚庯紝絳夊唴瀛樺瀮鍦劇Н绱埌涓瀹氱▼搴︼紝瀹屽叏閿佸畾鐢氳嚦鏆傚仠铏氭嫙鏈猴紝榪涜鍨冨溇鏀墮泦銆傚彲浠ュ皢榪欑鍨冨溇鏀墮泦鏈哄埗鏀規(guī)垚澧為噺寮忓茍琛屾敹闆嗭紝閬垮厤榪欑鍍墊銆傚悓鏍鋒槸鏀瑰姩netbeans_default_options錛屽湪琛屽悗鍔犱笂錛?/p>
netbeans_default_options=="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled"
鎬葷殑鏉ヨ錛屽鏋滀綘鎳掑緱鎯寵繖浜涳紝閲囩敤涓嬮潰鐨勯厤緗瘮杈冧笉閿欙細(xì)
netbeans_default_options="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-XX:+CMSPermGenSweepingEnabled --fontsize 12"
netbeans_default_options=="-J-Xms32m -J-Xmx256m0.....
J-Xms32m 絳変簬J-Xmx256m鏃訛紝榪愯姣旇緝欏虹晠
NetBeans浣跨敤蹇?jī)寰椾笁锛?xì)淇濆瓨閰嶇疆鍜屾敼鍙楯DK
NetBeans鍗囩駭澶揩錛岀粡甯擱渶瑕佷笅杞芥柊鐨勭増鏈畨瑁咃紝浣嗕竴閲嶆柊瀹夎鍘熸潵鐨勮緵杈涜嫤鑻︾殑閰嶇疆濂戒簡(jiǎn)鐨勪笢瑗塊兘娌℃湁浜?jiǎn)銆傚彟澶栭渶瑕佷嬌鐢ㄤ笉鍚岀殑JDK錛屼絾鏄噸鏂板嵏杞藉拰瀹夎netbeans鍙堟瘮杈冮夯鐑?chǔ)銆傚浣曡В鍐寵繖涓棶棰橈紵
鍘熸潵netbeans灝嗙敤鎴風(fēng)殑閰嶇疆鏀懼湪鐢ㄦ埛鐩綍涓嬬殑.netbeans鐩綍涓紝鍦╓indows涓嬶紝鐢ㄦ埛鐩綍鏄細(xì)
C:\Documents and Settings\<UserName>
灝嗚鐩綍澶囦喚淇濆瓨錛屽彲浠ラ伩鍏嶉噸鏂伴厤緗殑楹葷儲(chǔ)錛屽畨瑁呮柊鐨凬etBeans涔嬪悗錛屽皢.netbeans涓搴旂増鏈殑閰嶇疆鎷瘋礉鍒扮洰鏍囩増鏈殑鐩綍灝忓氨鍙互浜?jiǎn)銆傛瘮濡傛垜淇濆瓨浜?jiǎn)NetBeans5.0鐨勯厤緗紝鐜板湪瀹夎浜?.5錛屽彲浠ュ皢鍘熸潵.netbeans/5.0鐩綍涓嬬殑鍐呭錛岃鐩?netbeans/5.5涓嬬殑鍐呭錛屼綘鍘熸潵閰嶇疆鐨勫唴瀹瑰寘鍚綋鍓峸orkspace鐨勭姸鎬佸氨閮借漿縐昏繃鍘諱簡(jiǎn)銆?/p>
NetBeans浣跨敤蹇?jī)寰楀洓锛?xì)Java騫沖彴銆丯etBeans騫沖彴銆佺被搴撻厤緗鐞?/p>
NetBeans欏圭洰閫氬父鏉ヨ瑕侀拡瀵規(guī)煇涓狫ava鐗堟湰錛孨etBeans鎻掍歡寮鍙戦渶瑕佷互鏉ユ煇涓狽etBeans騫沖彴錛岃繖浜涢」鐩鏋滆浣跨敤絎笁鏂圭被搴擄紝閮介渶瑕佸紩鐢ㄨ繖浜涚被搴撱侼etBeans涓彁渚涗簡(jiǎn)鎵璋揓ava榪愯鏃跺鉤鍙般丯etBeans騫沖彴浠ュ強(qiáng)綾誨簱鐨勯厤緗鐞嗐備笅闈粙緇嶄竴涓嬪浣曢厤緗拰綆$悊榪欎簺騫沖彴鍙?qiáng)绫诲簱锛?xì)
1.Java騫沖彴綆$悊錛歍ools->Java Platform Manager錛岀己鐪佺殑鏈変竴涓狫DK鐨勫鉤鍙幫紝濡傛灉闇瑕佹坊鍔犲叾浠栫増鏈殑JDK錛屽彲浠ラ夋嫨鎸夐挳Add Platform...錛屽茍鍦ㄥ彸杈圭殑Classes, Sources鍜孞avadoc閫夋嫨闇瑕佹坊鍔犵殑綾匯傚啀閫夋嫨Add Platform榪欎釜鎸夐挳鏃訛紝NetBeans浼?xì)璇㈤棶浣燡DK鏍圭洰褰曪紝褰撴壘鍒板茍涓旈変腑榪欎釜鐩綍錛孨etBeans浼?xì)鑷姩灏咰lasses,Sources鍜孞avadoc鍐呭濉ソ銆備竴鑸鏋滄湁Sources浜?jiǎn)锛屽彲浠ヤ笉蹇呴塉avadoc錛孨etBeans浼?xì)鏍规嵁Sources鑷姩鐢熸垚Javadoc浠ヤ究寮曠敤銆侰lasses鏄敤鏉ョ紪璇戝拰榪愯浠ュ強(qiáng)浠g爜杈呭姪浣跨敤鐨勶紝Sources鍙互鐢ㄤ簬璋冭瘯紼嬪簭鏃惰窡韙唬鐮侊紝鑰孞avadoc浼?xì)琚玁etBeans鎬誨姩绱㈠紩鍒板府鍔╃郴緇?Help->Javadoc references)錛屼互鍙?qiáng)浠g爜杈呭姪涓槃·哄府鍔┿傚彲浠ヨ偗瀹氱殑璇磋繖鏍烽厤緗姣擡clipse鏂逛究鐨勫銆?/p>
2.鍜孞ava騫沖彴綆$悊鐩鎬技錛孨etBeans騫沖彴閰嶇疆澶т綋閬靛驚涓婇潰姝ラ錛岄夋嫨Tools->NetBeans Platform Manager錛岀劧鍚庣殑榪囩▼灝卞拰Java騫沖彴閰嶇疆涓鏍楓?/p>
3.鍜孞ava騫沖彴鍜孨etBeans騫沖彴閰嶇疆綾諱技錛岄夋嫨Tools->Library Manager閰嶇疆綾誨簱銆?/p>
閰嶇疆濂界殑Java榪愯鏃跺鉤鍙幫紝NetBeans騫沖彴浠ュ強(qiáng)綾誨簱錛屽彲浠ラ氳繃鍙抽敭閫夋嫨欏圭洰鐨勫睘鎬э紝鍦↙ibrary涓鏍忥紝閫夋嫨Java騫沖彴銆丯etBeans騫沖彴浠ュ強(qiáng)娣誨姞鍜屽垹闄ょ涓夋柟綾誨簱銆傛垨鑰呭睍寮欏圭洰鏍?wèi)锛屽湪Libraries鑺傜偣鍙抽敭鐐瑰嚮錛岄夋嫨New Library鎴栬匩ew Module Dependency銆?/p>
NetBeans浣跨敤蹇?jī)寰椾簲锛?xì)鐑敭閰嶇疆銆佹ā鍧楃鐞嗗強(qiáng)鍏朵粬閰嶇疆
鍒氫粠鍏朵粬IDE杞埌NetBeans鍚庯紝鏈変釜涓嶉『鎵嬬殑鍦版柟灝辨槸鐑敭宸埆杈冨ぇ錛岄潪甯稿父鐢ㄧ殑涓昏鏄唬鐮佽緟鍔╋紝鍦‥clipse鏄疌trl+/錛岃岃繖鍎夸嬌鐢ㄧ殑鏄疌trl+Space錛屽緢涓嶅垢鐨勬槸澶ч儴鍒嗘眽瀛楄緭鍏ユ硶宸茬粡鍗犵敤浜?jiǎn)杩欎釜鐑敭銆傚垢榪愮殑鏄疦etBeans鎻愪緵浜?jiǎn)淇敼鐑敭鐨勯厤缃潰鏉縏ools->Options->Keymap銆傚彟澶栨渶鏂扮増鏈殑NetBeans5.5榪樻彁渚涗簡(jiǎn)Eclipse鍜孍macs鐨勭儹閿槧灝勶紝榪欏浜庝粠eclipse鍜孍macs杞繃鏉ョ殑浜烘潵璇存棤鐤戞槸澶╁ぇ鐨勫ソ娑堟伅錛屼綘涓嶇敤鍦ㄩ傚簲鏂扮殑鐑敭錛屽彧瑕佸湪榪欏効閫夋嫨Eclipse鎴栬匛macs灝卞彲浠ヤ簡(jiǎn)銆?/p>
鍙﹀浣犱篃鍙互娣誨姞鏂扮殑鐑敭錛屾瘮濡傦紝鎴戝氨娣誨姞浜?jiǎn)涓涓敤浜庡叧闂伐紼嬬殑鐑敭錛岀儹閿厤緗腑錛岄夋嫨File->Close Project錛岀劧鍚庨夋嫨Add...鎸夐挳錛岄夋嫨Ctrl+Shift+Backspace錛屼綘灝卞畾涔夊叧闂伐紼嬬殑鐑敭涓篊trl+Shift+Backspace銆?/p>
NetBeans鐨勬ā鍧楃鐞嗚礋璐e悇縐嶆彃浠剁殑鏇存柊銆佷笅杞姐佸畨瑁呫佸嵏杞界瓑銆傚伐鍏蜂綅浜嶵ools->Module Manager鍜孶pdate Center錛岃繖鍎夸綘鍙互寰堢畝鍗曟牴鎹悜瀵肩殑鎻愮ず鏇存柊銆佷笅杞姐佸畨瑁呬互鍙?qiáng)鍗歌浇鍚効U嶆彃浠躲?/p>
鍏朵粬甯歌閰嶇疆閮借兘鍦═ools->Options鎵懼埌錛屽寘鎷細(xì)
1.General->View Java Packages as List/Tree錛岃浣犻夋嫨鏍?wèi)鎴栬呭垪琛ㄧ殑鏂瑰紡緇勭粐綾誨寘銆?/p>
2.General->Web Browser閰嶇疆緙虹渷鐨勬祻瑙堝櫒銆?/p>
3.General->Proxy閰嶇疆Web浠g悊錛屼富瑕佺敤浜庢洿鏂扮鐞嗗櫒銆?/p>
4.General->Auto Update閰嶇疆鑷姩鏇存柊鐨勬柟寮忎互鍙?qiáng)棰戠巼銆?/p>
5.General->Editor->General->Code Folding閰嶇疆浠g爜鎶樺彔閫夐」銆?/p>
6.General->Code Completion閰嶇疆杈呭姪浠g爜閫夐」錛氭槸鍚﹁嚜鍔ㄥ脊鍑恒佽嚜鍔ㄦ彃鍏ュ崟鐙夐」銆佸ぇ灝忓啓鏁忔劅銆佹槸鍚︽樉紺哄純鐢ㄤ唬鐮併?/p>
7.General->Indention閰嶇疆浠g爜緙╄繘閫夐」銆?/p>
8.General->Code Templates->瀹氫箟鍚勭蹇嵎妯″紡鐨勬ā鏉?/p>
9.General->Macros閰嶇疆瀹忓彉閲忋?/p>
鍙﹀涓浜涙潅欏瑰彲浠ュ湪Miscellaneous鍜孉dvanced閫夐」鎵懼埌銆傚父瑙佺殑鎶辨ㄦ槸杈呭姪浠g爜涓轟綍寮瑰嚭閭d箞鎱紝閿欒綰犳涓轟綍鍑虹幇閭d箞鎱紝騫朵笖琚涓烘槸NetBeans鎱㈢殑琛ㄧ幇錛屽疄闄呰繖浜涢兘鏄彲浠ラ厤緗殑錛屽茍涓嶆槸NetBeans閫犳垚鐨勶紝榪欎簺閰嶇疆緙虹渷鐨勫歡榪熸椂闂村お闀匡紝緇欑敤鎴烽犳垚NetBeans閫熷害寰堟參鍦伴敊瑙夈傝繖浜涜緗湪錛?/p>
Tools->Options->Advanced Options->Editing->Editor Settings->Java Editor->Delay of Completion Window Auto Popup
Tools->Options->Advanced Options->Editing->Java Sources->Automatic Parsing Delay
鏈鍚庯紝濡傛灉浣犲彂鐜版湁浜涗笉鎯充綘棰勬枡鐨凬etBeans琛屼負(fù)錛屽崈涓囦笉瑕侀┈涓婃姳鎬∟etBeans涓嶈兘榪欎釜錛屼笉鑳介偅涓紝寰堝彲鑳借繖鍙堟槸涓涓笉絎﹀悎浣犱互鍓嶄範(fàn)鎯殑鍦版柟錛屽湪閰嶇疆闈㈡澘鎵句竴鎵撅紝涔熻灝辮兘鎵懼埌浣犺鐨勮涓洪厤緗?/p>
netbeans涔熸湁涓涓被浼肩殑蹇嵎閿細(xì)Ctrl + \
鍙互浣跨敤 IDE-HOME/etc/netbeans.conf
涓嬭〃瀹氫箟浜?jiǎn)鍙敤浜?IDE 鐨勫紑鍏熾?/p>
--help錛堟垨 -h錛?/p>
鎵撳嵃甯哥敤鍚姩鍙傛暟鐨勬弿榪般?/p>
--jdkhome jdk-home-dir
浣跨敤鎸囧畾鐨?JavaTM 2 JDK 鐗堟湰錛岃屼笉鏄己鐪佺殑 JDK銆傚湪 Microsoft Windows 緋葷粺涓婏紝IDE 鍚姩紼嬪簭鍦ㄧ己鐪佹儏鍐典笅浼?xì)鏌ユ壘娉ㄥ唽琛ㄥQ屼嬌鐢ㄦ渶鏂扮殑鍙敤 JDK銆?/p>
鍦ㄥ崌綰?IDE 浣跨敤鐨?JDK 涔嬪墠錛屽簲璇ュ浠界敤鎴風(fēng)洰褰曘傚鏋滀互鍚庨渶瑕佹仮澶嶅埌鍏堝墠鐨?JDK錛屽彲浠ュ垏鎹㈠埌宸插浠界殑鐢ㄦ埛鐩綍錛屼粠鑰岀‘淇濅笉涓㈠け浠諱綍璁劇疆銆?/p>
瑕佸垏鎹?IDE 鐨勭敤鎴風(fēng)洰褰曪紝璇蜂嬌鐢?-userdir 寮鍏籌紝涓嬮潰灝嗗鍏惰繘琛岃緇嗕粙緇嶃?/p>
--cp:p additional-classpath
灝嗘寚瀹氱被璺緞緗簬 IDE 鐨勭被璺緞涔嬪墠銆?/p>
--cp:a additional-classpath
灝嗘寚瀹氱被璺緞闄勫姞鍒?IDE 鐨勭被璺緞涓娿?/p>
--open file
鍦ㄦ簮浠g爜緙栬緫鍣ㄤ腑鎵撳紑鏂囦歡銆?/p>
--open file:line number
鍦ㄦ簮浠g爜緙栬緫鍣ㄤ腑鎵撳紑鏂囦歡錛屽茍灝嗗厜鏍囩疆浜庢寚瀹氳涓娿?/p>
--laf UI-class-name
閫夋嫨緇欏畾鐨勭被浣滀負(fù) IDE 鐨勫瑙傘備互涓嬫槸涓や釜澶栬綾葷殑紺轟緥錛?/p>
com.sun.java.swing.plaf.motif.MotifLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
--fontsize size
璁劇疆 IDE 鐢ㄦ埛鐣岄潰涓殑瀛椾綋澶у皬錛屼互紓呰〃紺恒傚鏋滄湭浣跨敤姝ら夐」錛屽垯瀛椾綋澶у皬涓?11 紓呫?/p>
--locale language[:country[:variant]]
嬋媧繪寚瀹氱殑璇█鐜銆?/p>
--userdir userdir
鏄庣‘鎸囧畾鐢ㄦ埛鐩綍錛岃鐩綍鏄瓨鍌ㄧ敤鎴瘋緗殑浣嶇疆銆?/p>
濡傛灉鍦?UNIX® 鐜涓湭浣跨敤姝ら夐」錛屽垯緙虹渷鎯呭喌涓嬪湪 HOME 鐩綍涓緗敤鎴風(fēng)洰褰曘傚鏋滃湪 Microsoft Windows 緋葷粺涓婃湭璁劇疆姝ら夐」錛屽垯鐢ㄦ埛鐩綍鏄涓嬈″惎鍔?IDE 鏃舵寚瀹氱殑鐩綍銆?/p>
鍙互鍦?#8220;鍏充簬”瀵硅瘽妗嗕腑紜畾褰撳墠鐢ㄦ埛鐩綍銆傞夋嫨“甯姪”>“鍏充簬”銆傜劧鍚庡崟鍑?#8220;璇︾粏淇℃伅”鏍囩錛屽茍鏌ョ湅“鐢ㄦ埛鐩綍”瀛楁銆?/p>
-J jvm-flags
灝嗘寚瀹氭爣璁扮洿鎺ヤ紶閫掔粰 JVM 杞歡銆?/p>
-J-Dsun.java2d.noddraw=true
闃叉浣跨敤 DirectX 榪涜鍛堢幇銆傛寮鍏沖彲鑳戒細(xì)闃叉鍦ㄦ煇浜涘甫鏈変笉鍚堟牸鍥懼艦鍗$殑 Microsoft Windows 緋葷粺涓婂嚭鐜伴棶棰樸?/p>
-J-Dorg.netbeans.spi.java.project.support.ui.packageView.USE_TREE_VIEW=true
浠ュ熀浜庣洰褰曠殑瑙嗗浘錛堣屼笉鏄熀浜庡寘鐨勮鍥撅級(jí)鏄劇ず“欏圭洰”紿楀彛涓殑鍖呫?/p>
URL https://substance-netbeans.dev.java.net/files/documents/4104/35292/org-jvnet-substance-netbeans.nbm
涓嬭澆涔嬪悗
宸ュ叿-銆夋洿鏂頒腑蹇?銆夋墜鍔ㄤ笅杞藉畨瑁呯殑妯″潡-銆夋坊鍔?銆夊姞鍏ヤ綘鍒氫笅杞芥枃浠?銆変笅涓姝ョ煡閬撶粨鏉?/p>
瀹夎瀹屾瘯涔嬪悗鍗曞嚮瑙嗗浘鑿滃崟閲岄潰浼?xì)澶氬嚭鍑犱釜瀛愯彍鍗曞Q岀劧鍚庤嚜宸卞幓鐪嬪惂
濡傛灉鎴戣璁炬垚java榛樿鐨勯鏍艱鎬庝箞鏍瘋錛?/p>
鑳戒笉鑳借娓呮涓鐐?/p>
鎵懼埌鏂囦歡 nb瀹夎鐩綍/etc/netbeans.conf
-laf UI-class-name
閫夋嫨緇欏畾鐨勭被浣滀負(fù) IDE 鐨勫瑙傘備互涓嬫槸涓や釜澶栬綾葷殑紺轟緥錛?/p>
com.sun.java.swing.plaf.motif.MotifLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
榛樿鐨勬槸windows緋葷粺椋庢牸涓嶇敤璁劇疆
javax.swing.plaf.metal.MetalLookAndFeel榪欎釜甯?jìng)閲戝睘鐨勯鏍煎Q屾槸swing鐨勯鏍?/p>
鐪嬬湅閭d竴孌碉紝宸茬粡寰堟竻妤氫簡(jiǎn)
銆銆 鍘熸潵涓涓啀eclipse 涓嬬殑web欏圭洰鍥犱負(fù)緇忓父鍑哄吋瀹歸棶棰?鎵撶畻杞埌Netbeans涓嬶紝欏圭洰緙栫爜浣跨敤utf錛?錛屽啀緗戜笂鎵句簡(jiǎn)浜涜祫鏂欙紝緇堜簬鎼炲畾浜?jiǎn)netbeans鐨勭紪鐮佽緗細(xì)
銆銆
銆銆1銆嬫墦寮欏圭洰鐨勫睘鎬э紝璁劇疆緙栬瘧鍙傛暟錛?-encoding utf-8
銆銆
銆銆 Project Properties -> Build -> Compiling Sources -> Additional Compiler Options -> "-encoding utf-8"
銆銆
銆銆2銆嬭緗」鐩簮鏂囦歡鐨勭紪鐮佹槸 utf-8
銆銆
銆銆 Select files, Window -> Properties -> Text -> Encoding -> "UTF-8".
銆銆
銆銆3銆嬭緗?閫夐」錛嶏紞銆嬮珮綰?-->java婧愭枃浠惰涓簎tf-8
銆銆
銆銆 Tools -> Options -> Options -> Editing -> Java Sources -> Export -> Default Encoding -> UTF-8.
銆銆
銆銆鎼炲畾!
JDK6鍦⊿wing妗岄潰紼嬪簭涓婄殑鏀硅繘寰堝ぇ(涓嶈澶у涔熺煡閬?)
浣嗛粯璁ら厤緗笅鐨凬etBeans浠嶇劧 榪樻槸寰堟參銆?/p>
涓嬮潰璁茶鎴戝NetBeans鐨勯厤緗湅娉?/p>
絎竴 璋冧紭JVM
閽堝JVM鐨勮皟浼樺叾瀹炴槸鏈鍏抽敭鐨勪竴姝?閰嶇疆netbeans-5.5\etc\鐩綍涓嬬殑netbeans.conf鏂囦歡,灝唍etbeans_default_options鏇挎崲濡備笅
netbeans_default_options="-J-Xverify:none -J-Xms128m -J-Xmx128m -J-XX:CompileThreshold=10000 -J-XX:ReservedCodeCacheSize=100m -J-XX:PermSize=120m -J-XX:+UseConcMarkSweepGC -J-XX:+UseParNewGC -J-XX:+UseFastAccessorMethods -J-XX:+UseThreadPriorities -J-XX:+AggressiveOpts -J-Dapple.laf.useScreenMenuBar=true --fontsize 14 "
濂介暱鍝(∩_∩)o...闅忎究璁茶鍚箟鍚?/p>
-J-XX:CompileThreshold=10000 錛氬皢10000涓柟娉曠紪璇戞垚鏈湴浠g爜錛堜笉鍒╃敤JIT錛?/p>
-J-XX:ReservedCodeCacheSize=100m 錛氳緗紦瀛樺ぇ灝?/p>
-J-XX:+UseFastAccessorMethods 錛氬皢鎵鏈塯etter / setter 杞崲鎴愭湰鍦頒唬鐮?/p>
絎簩 鐜璁劇疆
榪欎竴姝ユ槸鍦∟etBeans IDE鍐呴儴璁劇疆銆傚湪 宸ュ叿--閫夐」--楂樼駭閫夐」錛?/p>
鍦?緙栬緫鍣ㄨ緗?涓皢 鏂囨湰騫蟲粦 鍘繪帀錛堜釜浜轟笉鍠滄榪欎釜錛屾繪劅瑙夐変笂鍚庢湁浜涘瓧姣嶈竟緙樻殑錛?/p>
鍦?緙栬緫鍣ㄨ緗?-java緙栬緫鍣ㄨ緗?涓皢 鑷姩瀹屾垚寮瑰嚭紿楀彛寤舵椂 璁劇疆涓?,閫変腑鑷姩寮瑰嚭javadoc紿楀彛
鍦?JAVA婧愪唬鐮?涓皢 閿欒鏍囨敞闄愬埗 鍜?鑷姩瑙f瀽寤惰繜 璁劇疆涓?,鍙﹀ 緙虹渷緙栫爜 榛樿鏄疓BK 寤鴻鍙互鏀規(guī)垚 UTF-8.浠ヤ究鍦ㄧЩ妞嶆簮浠g爜鍒伴潪GBK緙栫爜騫沖彴鐨勬椂鍊欎腑鏂囨敞閲婅兘姝g‘鏄劇ず銆?/p>
鍦?IDE閰嶇疆--寤鴻妗嗘灦 涓?鐨?涓歡榪熸椂闂撮兘鏀逛負(fù) 1
絎笁 瀛椾綋璁劇疆
榛樿鎯呭喌涓嬬殑NetBeans鐨勫瓧浣撶湡鐨勫緢闅劇湅,鍙互灝嗛潪娉ㄨВ鐨勫瓧浣撲笌瀛楃涓茬被鍨嬬殑鍏ㄩ儴璁劇疆涓篊ourier New 14鍙峰瓧浣擄紝娉ㄩ噴涓庡瓧絎︿覆綾誨瀷鐨勫瓧浣撹緗負(fù)瀹嬩綋 13鍙楓傝緗畬鍚庢槸涓嶆槸瑙夊緱寰堟紓浜紙涓嶈鎵撳紑 鏂囨湰騫蟲粦 鍔熻兘錛?/p>