??xml version="1.0" encoding="utf-8" standalone="yes"?> Netbeans 6.5 M1 已经发布,最新版本的NetBeans 增强了许多功?同时也引入了许多值得期待的新Ҏ? q有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 众多期待的特性一览表!
其中我比较喜Ƣ的是DataBase 的改q?Eclipse 目导入变得比以前更方便?可以正确的区分Web目
和普通项?q有Spring Hibernate 增强. GUI 中新增了JDK1.6 u10 中的look&feel 只要你用的是 JDK1.6 u10
可以用这个外观预?数据l定功能也改q了! 全新的多U程Debug 功能支持!
JavaScript 也加入的Debug功能,q加入了好几个Javascript ?像JQuery ,Yahoo ui dojo {等!
q新增了一?"驼峰拼写" 代码补全功能. 很有意?
JavaEE 的lib path 也变成了可变的了.此外q增加了快速搜索功? 更方便搜? q有好多个特性呢!
具体看下面的介绍! 英文太多了就不翻译了 大家自己看吧!
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
]]>
敬告Q?br />
------------------------------------------------------------
本文作者希望本文可以在|络及Q何媒体进行Q何Ş式的传播、复
制、引用、修改,在此q程中请保留此敬告内宏V?br />
谢谢Q?br />
popo
------------------------------------------------------------
NetBeans是基于ANTq行目的build和run的,所以我们可以方便的加入自己的target对原有项目进行扩展?br />
启动NetBeansQ打开以前写的SimpleWebSite_dao目Q因为我们要做的是利用XDoclet生成Hibernate?.hbm.xml(ORM)文gQ所以将XDoclet的所有Jar包解压到lib\xdoclet-1.3-SNAPSHOT目录下,不用在项目中引用XDoclet的包Q因为我们是要通过修改Build文g来引用这些包?br />
选择“Files”H口Q展开SimpleWebSite_dao目?br />
打开build.xml文gQ看该文件中的注释,大概是讲NetBeans为我们生成的build文g是nbproject/build-impl.xmlQbuild.xml已经import了build-impl文gQ如果我们想加入自己的target或者对原有targetq行修改Q只要改动build文g可以?br />
用NetBeans~辑XML文g很方便,可以对XML文gq行查和校验Qƈ且还有代码提C及补齐的功能:Q。导航窗口更是ؓ我们查看XML内容l构提供了极大的方便?br />
在build.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>
<!-- =================================================================== -->
<!-- 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文gQ在“Run target”中,会看到我们新加的target->“hibernatedoclet”?br />
现在写一个POJOQ用q个target生成.hbm.xml文g?br />
New 一个Java Class CustomerQ这个类的代码是从网上拷贝来的,因ؓ我对XDocletq不太熟悉)Q?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;
}
}
现在右键点build.xml文gQ在“Run target”中,?#8220;hibernatedoclet”QBUILD SUCCESSFUL?br />
在build\classes\hibernate目录下会看到~译后的Customer.class文g和XDoclet生成的Customer.hbm.xml?br />
Z方便Q我们进一步修改build.xml文gQ将build-impl.xml中的“jar”q个target复制_脓q来Qƈ改ؓ以下内容Q?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."/>
我只把depends中的compile改ؓ了hibernatedocletQ这样在~译后和打包前的时候,会生?.hbm.xml文g?br />
现在的build.xml文g内容如下Q?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>
在ProjectsH口Q?#8220;Build Project”或?#8220;Clean and Build Project”Q?br />
会看到用C我们修改后的jarq个targetq行的编译和打包?br />
XDoclet的功能很强大Q我会边学边在我的项目中利用它,可以省去很多~码工作?br />
看Appfuse的build.xmlQ数据库的表是用Hibernate提供的SchemaExportTask工具生成数据库徏表的SQLQ我们也来照做,q样只要在写POJO时加上注释,用ANT的target可以生?.hbm.xml文g和创建数据表的SQL语句。方便吧Q?br />
对build.xmlq行修改Q把生成*.hbm.xml文g的目标\径改为SRC目录Q不再depends="compile"Q改为在jar的时候先“hibernatedoclet”?#8220;compile”Q增加create_tables_sql的targetQ修改后的build.xml文g为:
<?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>
q样Q每?#8220;Build Project”或?#8220;Clean and Build Project”Ӟ都会先在源程序目录创?.hbm.xml文gQ再?./database/sql目录下生成创建数据表的SQL文gQ再q行~译Q打包?br />
用上面的CZ文g有几个问?br />
1.CustomercM * @hibernate.class tables="customers"应该?* @hibernate.class table="customers"Q?br />
2.生成的Customer.hbm.xml文g“create_tables_sql”时失败,提示信息为:
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)
为字D加上数据类型(type="java.lang.Long"Q后可以d文gQ但q是p|Q?br />
D:\ProjectNetBeans\SimpleWebSite\SimpleWebSite_Dao\build.xml:107: Schema text failed: Association references unmapped class: Order
因ؓ对XDoclet不熟Q对Hibernate的配|也快忘记差不多了,所以省点事儿,先把Order属性去掉?br />
“Clean and Build Project”Q哈哈,看看Q?.hbm.xml文g和徏数据库表的Sql语句都生成啦?br />
不过q没有试qDebug{targetQ如果那些target依赖生成?.hbm.xml文g的话Q还要对相应的target加上depends...
剩下的就是要多看看XDoclet和Hibernate配置的文档啦?
]]>
一、模?br />
用没有使用的模块:Tools》Plugins》Installed
选择不用的模块,Deactivate?br />
二?span class="hilite2">配置
~辑文gQ?br />
$NB_HOME/etc/netbeans.conf
修改 netbeans_default_options选项Q?br />
netbeans_default_options="xxxxxxxxxxxxxxx"
其中Q修改(-J-Xms的数g内存而定Q下面是512MB的例子)
-J-Xms64m -J-XX:PermSize=32m -J-XX:MaxPermSize=192m
再在末尾双引号前加入Q注意行首有个空|
-J-DuseGtk=true -J-Xverify:none -J-Djava.net.preferIPv4Stack=true
其中“-J-DuseGtk=true”是ؓ了界面用GTK风格Q这P字体已不?span class="hilite2">配置了。当然前提是用JDK6。而Fedora不用加这一,p动用GTK了,q是因ؓNetbeans的支持列表中没有ubuntulooks主题引擎
q是在版?.0beta2上的优化。经我实验,大大提高了NetBeans的启动速度.
1Q修改英文netbeans界面字体大小Q修?Netbeans_home%\etc\netbeans.conf
在netbeans_default_options里加?--fontsize 12
2Q修改JVM内存配置Q本机内?GQ不同内存大不同设|)
在netbeans_default_options里加?-J-Xmx512mQ同时修?J-Xms256m?br />
【说明?J-Xms32m
此设|用于通知 Java 虚拟机将其初始堆大小讄?32 MB。通过通知 JVM 它最初应该ؓ堆分配多内存,我们可以防止它随着 IDE 使用更多的内存而将堆增大?
【说明?J-Xmx128m
此设|用于指?Java 虚拟机应该用于堆的最大内存。对此数D|硬性上限意味着 Java q程不能使用比可用的物理 RAM 更多的内存。对于具有更多内存的pȝ可以提升此限?- 128 MB 讄有助于确?IDE ?256MB 的系l上可靠地执行操作。注意:不要此D|ؓ接近或大于系l中的物?RAM 敎ͼ否则在主要回收过E中导致频J的交换I间操作?/p>
3Q在netbeans_default_options里修?-J-XX:PermSize=20m
q是一个较Ҏ?JVM 开养I但它也羃短了启动旉。此讄用于调整内存?#8220;怹区域”Q在q里保存c)的大。由于我们知道所?IDE cd占用特定数量的内存,因此我们?JVM 提示它将需要的内存数量。此讄消除了许多系l上启动q程中的主要垃圾回收事g。SunONE Studio 或包括更多模块的其他 IDE 的用户可能希望将此数D|得更高些?/p>
4Q在netbeans_default_options里加?J-Xverify:none
此开关用于关?Java 字节码验证,从而加快类加蝲Q以及消除在启动q程中仅为验证目的而加载类的需要。此开兛_显著~短启动旉?/p>
5Q在Tools-Plugins-installed里面把不需要的模块L
我这里去掉了 GlashfishQJSFQCVSQSubversion{。速度得到很大提高了。当然如果你的开发需要这些模块就不需要去掉了?/p>
6Q修改编辑器配置
把所有的Javadoc自动弹出H口LQ把所有自动完成g时设|ؓ0Q把所有自动完成大写敏感L?br />
注:在netbeans6的JAVA代码~辑器设|里面默认没有设|代码自动完成的延时讄了。可以自己手动加入到配置文gC:\Documents and Settings\%USER_NAME%\.netbeans\6.0beta2\config\Editors\text\x-java下的properties.xmlQ加?br />
<property class="java.lang.Integer" name="completion-auto-popup-delay" value="1"/>
【说明?preperties.xml文g默认不存在,只有在你修改了编辑器配置以后才会出现q个文g
环境讄
q一步是在NetBeans IDE内部讄。在 工具--选项--高选项Q?br />
?~辑器设|?中将 文本qx LQ个Z喜欢q个QL觉选上后有些字母边~怪怪的Q?br />
?~辑器设|?-java~辑器设|?中将 自动完成弹出H口延时 讄?,选中自动弹出javadocH口
?JAVA源代?中将 错误标注限制 ?自动解析延迟 讄?,另外 ~省~码 默认是GBK 可以Ҏ UTF-8.以便在移植源代码到非GBK~码q_的时候中文注释能正确昄?br />
?IDE配置--框架 ??个gq时间都改ؓ 1
字体讄
默认情况下的NetBeans的字体真的很隄,可以非注解的字体与字符串类型的全部讄为Courier New 14号字体,注释与字W串cd的字体设|ؓ宋体 13受设|完后是不是觉得很漂亮(不要打开 文本qx 功能Q?/p>
1.NetBeans界面上的普通字体大,可以通过配置NetBeans安装目录下netbeans.conf启动文g来实玎ͼq个文g?lt;NetBeans>/etc目录下。缺省的NetBeans在用Swing的缺省字体,大小?1Q稍E嫌,如果要改?2Q可以将文g中的下面一行:
netbeans_default_options="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"
Ҏ
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"
另外Q也可以通过讄Swing的一个控制字体的pȝ属性swing.useSystemFontSetting来实玎ͼ
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.~辑器的字体可以通过选项讄来实玎ͼ具体是Tools->Options->Fonts & ColorsQ这儿可以设|包含字体、前后背景等讄。刚转到NetBeansӞ我就按照Eclipse和VS2003刚设|了一套设|,讄好了之后的NetBeans特别漂亮Q一炚w不输lEclipse?/p>
3.字体锯问题Q解册个问题,首先你要使用Java6。Java6支持LCD和反走样(anti-alias)字体Q安装Java6后,修改etc/netbeans.conf让NetBeans使用Java6。需要注意的是在Windows下需要明打开操作pȝ的字体边~^滑设|后Q才起作用。设|方法是Q右键点L面,选择外观->效果->使用下列方式使字体的边缘qx->清晰Q然后启动NetBeans可以了?/p>
另外Q我个h觉得NetBeans~省的工h按钮太大Q如果你和我有同h觉,可以右键点击工具栏,从下拉菜单中选择Small Toolbar Icons?/p>
你将~省字体改ؓDialogInput 12可以了?/p>
NetBeans使用心得二:内存和垃圾收集机刉|?/p>
NetBeans的缺省的内存配置偏低Q只?28MQ实际上Eclipse的缺省配|ؓ256MQ对于NetBeansq样拥有如此之多的功能,却才使用128M是不太合适的。曾l在别h的博客上看到Q最佳的内存配置应该为物理内存的1/3Q如果小于这个|NetBeans难以发挥全效,如果大于q个值就会造成操作pȝ内存抖动。就NetBeans5.5来说Q官方网站上规定的最内存是512MQ推荐内?GQ这一点和其他Java IDE一P比如Eclipse官方规定的最内存居然是1G。这让我不得不叹息我们的电脑实在太落后了。我安的工作机?56MQ后来买?12MM去,d?68MQ因此按?/3原则Q我把NetBeans讄?56M。如何设|这个值呢Q同前文一栯讄启动文g <NetBeans>/etc/netbeans.confQ打开启动文gQ将netbeans_default_options一行中?J-Xmx选项讄?56M可以了Q如下:
netbeans_default_options=="-J-Xms32m -J-Xmx256m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -J-Xverify:none -J-Dapple.laf.useScreenMenuBar=true"
使用NetBeans的缺省配|,在长旉的运行后Q往往会突焉僵住了,没有响应Q这是因为JVM~省的垃圾收集机制不使用增量式ƈ行收集,而是隔断旉后,{内存垃圄累到一定程度,完全锁定甚至暂停虚拟机,q行垃圾攉。可以将q种垃圾攉机制Ҏ增量式ƈ行收集,避免q种僉|。同h改动netbeans_default_optionsQ在行后加上Q?/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"
ȝ来说Q如果你懒得惌些,采用下面的配|比较不错:
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Ӟq行比较畅
NetBeans使用心得三:保存配置和改变JDK
NetBeans升太快Q经帔R要下载新的版本安装,但一重新安装原来的辛辛苦苦的配置好了的东襉K没有了。另外需要用不同的JDKQ但是重新卸载和安装netbeans又比较麻烦。如何解册个问题?
原来netbeans用L配置攑֜用户目录下的.netbeans目录中,在Windows下,用户目录是:
C:\Documents and Settings\<UserName>
该目录备䆾保存Q可以避免重新配|的ȝQ安装新的NetBeans之后Q将.netbeans中对应版本的配置拯到目标版本的目录就可以了。比如我保存了NetBeans5.0的配|,现在安装?.5Q可以将原来.netbeans/5.0目录下的内容Q覆?netbeans/5.5下的内容Q你原来配置的内容包含当前workspace的状态就都{U过M?/p>
NetBeans使用心得四:Javaq_、NetBeansq_、类库配|管?/p>
NetBeans目通常来说要针Ҏ个Java版本QNetBeans插g开发需要以来某个NetBeansq_Q这些项目如果要使用W三方类库,都需要引用这些类库。NetBeans中提供了所谓Javaq行时^台、NetBeansq_以及cd的配|管理。下面介l一下如何配|和理q些q_及类库:
1.Javaq_理QTools->Java Platform ManagerQ缺省的有一个JDK的^収ͼ如果需要添加其他版本的JDKQ可以选择按钮Add Platform...Qƈ在右边的Classes, Sources和Javadoc选择需要添加的cR再选择Add Platformq个按钮ӞNetBeans会询问你JDK根目录,当找到ƈ且选中q个目录QNetBeans会自动将Classes,Sources和Javadoc内容填好。一般如果有Sources了,可以不必选JavadocQNetBeans会根据Sources自动生成Javadoc以便引用。Classes是用来编译和q行以及代码辅助使用的,Sources可以用于调试E序时跟t代码,而Javadoc会被NetBeansd索引到帮助系l?Help->Javadoc references)Q以及代码辅助中昄帮助。可以肯定的说这样配|要比Eclipse方便的多?/p>
2.和Javaq_理怼QNetBeansq_配置大体遵@上面步骤Q选择Tools->NetBeans Platform ManagerQ然后的q程和Javaq_配置一栗?/p>
3.和Javaq_和NetBeansq_配置cMQ选择Tools->Library Manager配置cd?/p>
配置好的Javaq行时^収ͼNetBeansq_以及cdQ可以通过右键选择目的属性,在Library一栏,选择Javaq_、NetBeansq_以及d和删除第三方cd。或者展开目树,在Libraries节点右键点击Q选择New Library或者New Module Dependency?/p>
NetBeans使用心得五:热键配置、模块管理及其他配置
刚从其他IDE转到NetBeans后,有个不顺手的地方是热键差别较大Q非常常用的主要是代码辅助,在Eclipse是Ctrl+/Q而这儿用的是Ctrl+SpaceQ很不幸的是大部分汉字输入法已经占用了这个热键。幸q的是NetBeans提供了修改热键的配置面板Tools->Options->Keymap。另外最新版本的NetBeans5.5q提供了Eclipse和Emacs的热键映,q对于从eclipse和Emacs转过来的人来说无疑是天大的好消息Q你不用在适应新的热键Q只要在q儿选择Eclipse或者Emacs可以了?/p>
另外你也可以d新的热键Q比如,我就d了一个用于关闭工E的热键Q热键配|中Q选择File->Close ProjectQ然后选择Add...按钮Q选择Ctrl+Shift+BackspaceQ你定义关闭工E的热键为Ctrl+Shift+Backspace?/p>
NetBeans的模块管理负责各U插件的更新、下载、安装、卸载等。工具位于Tools->Module Manager和Update CenterQ这儿你可以很简单根据向导的提示更新、下载、安装以及卸载各U插件?/p>
其他常见配置都能在Tools->Options扑ֈQ包括:
1.General->View Java Packages as List/TreeQ让你选择树或者列表的方式l织cd?/p>
2.General->Web Browser配置~省的浏览器?/p>
3.General->Proxy配置Web代理Q主要用于更新管理器?/p>
4.General->Auto Update配置自动更新的方式以及频率?/p>
5.General->Editor->General->Code Folding配置代码折叠选项?/p>
6.General->Code Completion配置辅助代码选项Q是否自动弹出、自动插入单独选项、大写敏感、是否显C弃用代码?/p>
7.General->Indention配置代码~进选项?/p>
8.General->Code Templates->定义各种快捷模式的模?/p>
9.General->Macros配置宏变量?/p>
另外一些杂可以在Miscellaneous和Advanced选项扑ֈ。常见的抱怨是辅助代码Z弹出那么慢,错误U正Z出现那么慢,q且被认为是NetBeans慢的表现Q实际这些都是可以配|的Qƈ不是NetBeans造成的,q些配置~省的gq时间太长,l用户造成NetBeans速度很慢地错觉。这些设|在Q?/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
最后,如果你发现有些不想你预料的NetBeans行ؓQ千万不要马上抱怨NetBeans不能q个Q不能那个,很可能这又是一个不W合你以前习惯的地方Q在配置面板找一找,也许p扑ֈ你要的行为配|?/p>
netbeans也有一个类似的快捷键:Ctrl + \
可以使用 IDE-HOME/etc/netbeans.conf
下表定义了可用于 IDE 的开兟?/p>
--helpQ或 -hQ?/p>
打印常用启动参数的描q?/p>
--jdkhome jdk-home-dir
使用指定?JavaTM 2 JDK 版本Q而不是缺省的 JDK。在 Microsoft Windows pȝ上,IDE 启动E序在缺省情况下会查找注册表Q用最新的可用 JDK?/p>
在升U?IDE 使用?JDK 之前Q应该备份用L录。如果以后需要恢复到先前?JDKQ可以切换到已备份的用户目录Q从而确保不丢失M讄?/p>
要切?IDE 的用L录,请?-userdir 开养I下面对其进行详l介l?/p>
--cp:p additional-classpath
指定类路径|于 IDE 的类路径之前?/p>
--cp:a additional-classpath
指定类路径附加?IDE 的类路径上?/p>
--open file
在源代码~辑器中打开文g?/p>
--open file:line number
在源代码~辑器中打开文gQƈ光标置于指定行上?/p>
--laf UI-class-name
选择l定的类作ؓ IDE 的外观。以下是两个外观cȝCZQ?/p>
com.sun.java.swing.plaf.motif.MotifLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
--fontsize size
讄 IDE 用户界面中的字体大小Q以表C。如果未使用此选项Q则字体大小?11 ?/p>
--locale language[:country[:variant]]
ȀzL定的语言环境?/p>
--userdir userdir
明确指定用户目录Q该目录是存储用戯|的位置?/p>
如果?UNIX® 环境中未使用此选项Q则~省情况下在 HOME 目录中设|用L录。如果在 Microsoft Windows pȝ上未讄此选项Q则用户目录是第一ơ启?IDE 时指定的目录?/p>
可以?#8220;关于”对话框中定当前用户目录。选择“帮助”>“关于”。然后单?#8220;详细信息”标签Qƈ查看“用户目录”字段?/p>
-J jvm-flags
指定标记直接传递给 JVM 软g?/p>
-J-Dsun.java2d.noddraw=true
防止使用 DirectX q行呈现。此开兛_能会防止在某些带有不合格囑Ş卡的 Microsoft Windows pȝ上出现问题?/p>
-J-Dorg.netbeans.spi.java.project.support.ui.packageView.USE_TREE_VIEW=true
以基于目录的视图Q而不是基于包的视图)昄“目”H口中的包?/p>
URL https://substance-netbeans.dev.java.net/files/documents/4104/35292/org-jvnet-substance-netbeans.nbm
下蝲之后
工具-〉更C?〉手动下载安装的模块-〉添?〉加入你刚下载文?〉下一步知道结?/p>
安装完毕之后单击视图菜单里面会多出几个子菜单Q然后自己去看吧
如果我要设成java默认的风D怎么栯Q?/p>
能不能说清楚一?/p>
扑ֈ文g nb安装目录/etc/netbeans.conf
-laf UI-class-name
选择l定的类作ؓ IDE 的外观。以下是两个外观cȝCZQ?/p>
com.sun.java.swing.plaf.motif.MotifLookAndFeel
javax.swing.plaf.metal.MetalLookAndFeel
默认的是windowspȝ风格不用讄
javax.swing.plaf.metal.MetalLookAndFeelq个市金属的风格Q是swing的风?/p>
看看那一D,已经很清楚了
原来一个再eclipse 下的web目因ؓl常出兼定w?打算转到Netbeans下,目~码使用utfQ?Q再|上找了些资料,l于搞定了netbeans的编码设|:
1》打开目的属性,讄~译参数Q?-encoding utf-8
Project Properties -> Build -> Compiling Sources -> Additional Compiler Options -> "-encoding utf-8"
2》设|项目源文g的编码是 utf-8
Select files, Window -> Properties -> Text -> Encoding -> "UTF-8".
3》设|?选项Q-》高U?-->java源文件设为utf-8
Tools -> Options -> Options -> Editing -> Java Sources -> Export -> Default Encoding -> UTF-8.
搞定!
JDK6在Swing桌面E序上的改进很大(不说大家也知?)
但默认配|下的NetBeans仍然 q是很慢?/p>
下面讲讲我对NetBeans的配|看?/p>
W一 调优JVM
针对JVM的调优其实是最关键的一?配置netbeans-5.5\etc\目录下的netbeans.conf文g,netbeans_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(∩_∩)o...随便讲讲含义?/p>
-J-XX:CompileThreshold=10000 Q将10000个方法编译成本地代码Q不利用JITQ?/p>
-J-XX:ReservedCodeCacheSize=100m Q设|缓存大?/p>
-J-XX:+UseFastAccessorMethods Q将所有getter / setter 转换成本C?/p>
W二 环境讄
q一步是在NetBeans IDE内部讄。在 工具--选项--高选项Q?/p>
?~辑器设|?中将 文本qx LQ个Z喜欢q个QL觉选上后有些字母边~怪怪的Q?/p>
?~辑器设|?-java~辑器设|?中将 自动完成弹出H口延时 讄?,选中自动弹出javadocH口
?JAVA源代?中将 错误标注限制 ?自动解析延迟 讄?,另外 ~省~码 默认是GBK 可以Ҏ UTF-8.以便在移植源代码到非GBK~码q_的时候中文注释能正确昄?/p>
?IDE配置--框架 ??个gq时间都改ؓ 1
W三 字体讄
默认情况下的NetBeans的字体真的很隄,可以非注解的字体与字符串类型的全部讄为Courier New 14号字体,注释与字W串cd的字体设|ؓ宋体 13受设|完后是不是觉得很漂亮(不要打开 文本qx 功能Q?/p>