Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Apress
committed
Oct 16, 2016
0 parents
commit d585a01
Showing
1,516 changed files
with
125,445 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Freeware License, some rights reserved | ||
|
||
Copyright (c) 2011 Anghel Leonard | ||
|
||
Permission is hereby granted, free of charge, to anyone obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to work with the Software within the limits of freeware distribution and fair use. | ||
This includes the rights to use, copy, and modify the Software for personal use. | ||
Users are also allowed and encouraged to submit corrections and modifications | ||
to the Software for the benefit of other users. | ||
|
||
It is not allowed to reuse, modify, or redistribute the Software for | ||
commercial use in any way, or for a user�s educational materials such as books | ||
or blog articles without prior permission from the copyright holder. | ||
|
||
The above copyright notice and this permission notice need to be included | ||
in all copies or substantial portions of the software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?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.) --> | ||
<!-- By default, only the Clean and Build commands use this build script. --> | ||
<!-- Commands such as Run, Debug, and Test only use this build script if --> | ||
<!-- the Compile on Save feature is turned off for the project. --> | ||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> | ||
<!-- in the project's Project Properties dialog box.--> | ||
<project name="path_01" default="default" basedir="."> | ||
<description>Builds, tests, and runs the project path_01.</description> | ||
<import file="nbproject/build-impl.xml"/> | ||
<!-- | ||
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="path_01-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. | ||
--> | ||
</project> |
4 changes: 4 additions & 0 deletions
4
Pro Java 7 NIO.2/Chapter01/path/path_01/build/built-jar.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#Sun, 16 Oct 2011 15:47:54 +0200 | ||
|
||
|
||
C\:\\NIO\\path\\path_01= |
Empty file.
Binary file added
BIN
+2.39 KB
Pro Java 7 NIO.2/Chapter01/path/path_01/build/classes/path_01/Main.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
======================== | ||
BUILD OUTPUT DESCRIPTION | ||
======================== | ||
|
||
When you build an Java application project that has a main class, the IDE | ||
automatically copies all of the JAR | ||
files on the projects classpath to your projects dist/lib folder. The IDE | ||
also adds each of the JAR files to the Class-Path element in the application | ||
JAR files manifest file (MANIFEST.MF). | ||
|
||
To run the project from the command line, go to the dist folder and | ||
type the following: | ||
|
||
java -jar "path_01.jar" | ||
|
||
To distribute this project, zip up the dist folder (including the lib folder) | ||
and distribute the ZIP file. | ||
|
||
Notes: | ||
|
||
* If two JAR files on the project classpath have the same name, only the first | ||
JAR file is copied to the lib folder. | ||
* Only JAR files are copied to the lib folder. | ||
If the classpath contains other types of files or folders, none of the | ||
classpath elements are copied to the lib folder. In such a case, | ||
you need to copy the classpath elements to the lib folder manually after the build. | ||
* If a library on the projects classpath also has a Class-Path element | ||
specified in the manifest,the content of the Class-Path element has to be on | ||
the projects runtime path. | ||
* To set a main class in a standard Java project, right-click the project node | ||
in the Projects window and choose Properties. Then click Run and enter the | ||
class name in the Main Class field. Alternatively, you can manually type the | ||
class name in the manifest Main-Class element. |
Binary file not shown.
Binary file added
BIN
+17.5 KB
...hapter01/path/path_01/lib/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar
Binary file not shown.
Binary file added
BIN
+70.9 KB
Pro Java 7 NIO.2/Chapter01/path/path_01/lib/junit/junit-3.8.2-api.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
Pro Java 7 NIO.2/Chapter01/path/path_01/lib/nblibraries.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
libs.CopyLibs.classpath=\ | ||
${base}/CopyLibs/org-netbeans-modules-java-j2seproject-copylibstask.jar | ||
libs.junit.classpath=\ | ||
${base}/junit/junit-3.8.2.jar | ||
libs.junit.javadoc=\ | ||
${base}/junit/junit-3.8.2-api.zip | ||
libs.junit_4.classpath=\ | ||
${base}/junit_4/junit-4.5.jar | ||
libs.junit_4.javadoc=\ | ||
${base}/junit_4/junit-4.5-api.zip | ||
libs.junit_4.src=\ | ||
${base}/junit_4/junit-4.5-src.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
X-COMMENT: Main-Class will be added automatically by build | ||
|
Oops, something went wrong.