| Summary &
Download
| Installation Tips |
Background |
| 1 |
Java
Platform standard edition 5.0 |
Start from the above page. Click Download
JDK 5.0
Update
4 Sun regularly updates the JDK so the last
digit may be greater than 4. Click the
radio button to accept the license agreement.
Click Windows
Offline
Installation, Multi-language to
download the file.
Enhance
your Eclipse Java productivity; pick up one of these quick
reference books
which will help you find Java APIs and examples faster.
Java
In A Nutshell
Java
Developers ALMANAC 1.4
|
| A.
Run the installer. Accept all the default
values offered.
B.
Set the JAVA_HOME and PATH environment variables. Start
from your desktop right click on MyComputer
and
select Properties.
From
the system
properties dialog select the Advanced
tab.
Near
the bottom of
the tab select Environment Variables.
In the System
Variables frame (near the bottom) press New.
Populate dialog as
follows: Variable
Name: JAVA_HOME
Variable Value: C:\Program Files\Java\j2sdk1.5.0_04
Note: If
needed,
change the ending 04 to the correct update. Press OK
In the
System Variables window
scroll down and select the Path
variable. Press
the Edit button.
Scroll to the
beginning of the
Variable Value. Insert %JAVA_HOME%/bin;
in front of the other values and press OK OK OK
|
Stay tuned, we will be
updating the site with more helpful
information in the very near future. Subscribe to our newsletter and be
the
first to know when the site is updated.
If you sign up today and you will get Nathan's top plug-in list. Out
of
the thousands of plug-ins available how do you know which ones are the
best and
work well with one another? Save yourself hours of frustration and
check
out the list today.
Subscribe to the JavaNut.com Eclipse Development Newsletter using the
form
below.
|
Many applications(such as Tomcat ) expect to
find the
environment variable JAVA_HOME set to the home folder of your desired
Java
Virtual Machine(JVM). Use this variable in your scripts, when
defining other environment variables or anyplace you need to know the
path to your default JVM. When you need to switch between different
JVMs for
testing the change will be easier because only this one environment
variable will need to be modified.
The
installers from Sun will add the
Java executables to your c:\windows\system32
folder this ensures that its always on the path.
This may not be desirable when testing code against a legacy
version of Java. To solve this the %JAVA_HOME%/bin folder is
added to the front of the PATH environment variable. This
addition will also allow the other command line utilities like keytool
to be accessible at the command prompt.
The full
installer jdk-1_5_0_04-windows-i586-p.exe for
offline use should be archived to CD or other media for safe keeping. It
will come in handy if the sites copy should become
unavailable or multiple installations need to be done.
Keeping
an archived copy may also be helpful for regression testing in
the future when you no longer have this version installed.
|
| 2 |
Apache
Ant 1.6 | Ant 1.6
from Apache
Start from the above
page.
Click apache-ant-1.6.5-bin.zip
found about half way
down the page.
Apache regularly updates Ant so the last
digit may be greater than 5. If
the above site is slow or down try this direct download. Mirror
for Ant 1.6.5
Start
leveraging automated build, test and deployment scripts today.
Get a jump start on all the tips and tricks buy getting one
of
these helpful books. Ant:
The Definitive Guide Java
Development with Ant |
| A.
Unzip the
file into the C:\apps folder.
Tip:
The fastest tool for working with
compressed archives such as zip
is the free 7-Zip
utility. B.
Set the ANT_HOME and PATH environment variables. Start
from your desktop right click on MyComputer
and
select Properties.
From
the system
properties dialog select the Advanced
tab.
Near
the bottom of
the tab select Environment Variables.
In the System
Variables frame (near the bottom) press New.
Populate dialog as
follows: Variable
Name:
ANT_HOME
Variable Value: C:\apps\apache-ant-1.6.5Note:
If needed,
increment the ending 5. Press OK
In the
System Variables window
scroll down and select the Path
variable. Press
the Edit button.
Scroll to the
beginning of the
Variable Value. Directly after the
%JAVA_HOME%/bin; path insert %ANT_HOME%/bin;press OK OK OK |
Ant is
the defacto Java make utility. Almost all Java projects of significant
size contain a build.xml file. Typical build.xml files
contain scripted tasks for compiling, testing and environment cleanup.
To find out what tasks are available go to the folder
containing the build.xml file. Type ant
-p this will show a list of tasks with descriptions if
they are available. To run any of the tasks type ant Followed by the task name.
Developers
working with different IDEs or even on different platforms can easily
work together as a result of this standard utility. All the
(good) Java development environments that are popular today support
integration with Ant.
To
keep the environment
well organized all of the development tools and libraries will be put
into the C:\apps directory. The C:\apps folder will be easy
to find when changes need to be made due to new releases of the tools
and libraries. Do not put any of your development code into
this folder, use C:\workspace instead.
Keeping
the development
projects separate from the dependent tools and libraries will make it
clear which libraries are ready for use and which are still under
development. |
| 3 |
JUnit
3.8 |
JUnit
3.8
Start from the above page.
Under the word Download click
on Junit3.8.1.zip
At
the sourceforge.net download server click on the icon in the download column
which corresponds the city closest to you
geographically. |
| A.
Unzip the
file into the C:\apps folder.
If you have not installed the 7-Zip
utility you now have another opportunity. The installer is
easy to use just accept the default settings.
B. Enable JUnit testing from within Ant. Copy
the file C:\apps\junit3.8.1\junit.jar
to
C:\apps\apache-ant-1.6.5\lib
| Building and
running unit
tests greatly improves product quality. The test first
methodology, popular among Java developers today, states that
you should have a test built for
each requirement and alternate path before you start to code. Your
focus should then be to
write code that makes the tests pass. You are done coding when
this is archived.
Many ant scripts will include
tasks
that perform full regression testing with JUnit.
This guarantees the integrity of the software and has great
benefit when working with others. Each developer must
ensure the tests pass before sharing their work
with others. When getting new code the unit
tests should be run again to ensure the integrity before
continuing.
Apache does not distribute JUnit
with
Ant because it is not supported by them.
To enable unit testing tasks within ant the junit.jar file
must be
copied to ant's lib folder.
|
| 4a | Subversion
1.2 server set up |
SVN
1.2.1 from Tigris.org
Start from the above page. Click
svn-1.2.1-set up-2.exe
SVN Service Wrapper for Windows
Start
from the above page. Click SVNService.zip
If you wish to
access
the repository over HTTP you will also need to download the
Apache http server.
Apache
HTTP Server 2.0.54
Start from the
above
page.
Click
apache_2.0.54- win32-x86-no_ssl.msi
The instructions for setting up a subversion
server will
require a
text editor. Try NotePad++ it's a fast
loading, easy to use syntax highlighting editor and its free. |
| Note: If you do not need HTTP access to your
repository skip step A do step B. A. Run the Apache
installer. Accept
the default values offered.
On
the server information page you need to enter a valid email address for
the admin along with your sever name and domain if they are not
correct.
B.
Run the svn installer. Accept
the default
values offered.
Be sure to check the Apache
modules
box on the "Select Additional Tasks" page if you want HTTP
access to the repository.
C. Set up
your first repository at
the
dos
prompt type:svnadmin
create C:\svnRepo
using your favorite text editor
open the file: c:\svnRepo\conf\svnserve.conf
remove the # symbol and any
spaces that appear in front of the following lines. [general] anon-access
= read auth-access = write password-db = passwd
if
you wish to block non authenticated users from browsing the repository
leave the # in front of the anon-access line.
Save
the file.
using your favorite text editor again
open the file: c:\svnRepo\conf\passwd
remove the
# symbol and any spaces that appear in front of the [users] line. Add
as many users as you would like, one per line with the passwords.
There are 2 examples already in the file.
Save
the file
D.
Enable access via the
SVN:// protocol
open
the SVNService.zip file (use 7-zip) and copy SVNService.exe
into: C:\Program Files\Subversion\bin
at
the
dos prompt type: SVNService -install -d -r c:\svnRepo Open
the Control
Panel
window select Administrative
Tools then
click
Services
scroll
down to SVNService open it
with a double click.
change the Startup Type: to
Automatic. Press
Start
Press OK.
close
the services window close Administrative tools window
E.
Enable access via the HTTP:// protocol
open a
dos window and go to the folder:C:\Program Files\Apache Group \apache2\bin\ create
password file with a login for adminhtpasswd -cm c:\svnRepo\.htaccess admin add
users with the following command, replace user with a real users name.
htpasswd -m c:\svnRepo\.htaccess user With a text
editor open C:\Program
Files\Apache
Group\Apache2\conf\httpd.conf
add
the
following
to the bottom of the file:
<Location
/svn> DAV svn
SVNPath
C:/svnRepo AuthType Basic
AuthName
"Subversion repository" AuthUserFile
c:/svnRepo/.htaccess Require
valid-user
</Location> Save
the file Restart
Apache |
Note:
If you already have a Subversion
repository set up on another machine you can skip this and move on to
4b.
A version
control system is a necessity for development projects of any
significant size. Without this your teams
flexibility will be limited. A good version control system
will support
Branching, Merging, Rollbacks and other features. Most version control
products available commercially are either very limited
in the
features they support or they are over priced.
Over
the years many projects have used CVS because it had most of the
features everyone needed and it was free. Even though CVS was
and still is a popular choice it has some limitations. For
example it does not keep your history of changes for a specific file if
the file
is renamed.
Subversion (SVN) was
designed to replace CVS and correct the perceived limitations. Since
its release
SVN has quickly grown in popularity.
Subversion
Feature Highlights
* Fast
and easy branching
* Both on and off line backups
* Atomic commits
* Runs stand alone or in Apache
* Folder based revision history
Subversion
when installed as a service will provide access
to the repository via the svn:// protocol. If you need
exposte this access
through a firewall you have two options. The easiest option
is to open up port 3690 on both TCP and UDP. For security
reasons
you may wish to only provide access over the http:// protocol, this can
be
done by installing Apache and following the instructions in steps A and
E.
A single repository will be used for many
projects. See 4b for more in depth
instructions on adding new projects.
|
| 4b | Subversion
1.2 client tools | SVN Tortoise
On the above page click download
then
clickDownload
TortoiseSVN-1.2.1. 3895-svn-1.2.1.msiAt
the sourceforge.net download server click on the icon
in the download column
which corresponds the city closest to you
geographically. |
| A. Run the svn installer for the
client. This
is the same (svn-1.2.1-set up-2.exe) installer used in the previous step.
Accept all the default
values offered until you come to the "Select Additional
Tasks" page.
For the client machine install
you do not need the Apache modules so uncheck the last box
before continuing. B. Run the SVN Tortoise installer Accept the default
values offered. After you restart SVNTortoise will be integrated into the
windows explorer whenever you right click on a folder or a file. C. Connect to the server and
create your project
Right click on any file or
folder to bring up the windows explorer context menu.
Select SVNTortoise
Select Repo-Browser In the URL: box type svn://SERVERNAME or if you
set up Apache you can
use http://SERVERNAME/svn
You will be prompted for
a username and password based on what was set up in step 4a.
Right click on the Root folder
for this repository. Use the Create
Folder...option
to add a folder for your project. Use a meaningful but
relatively short project name for this.
Using
the same method add 3 folders to your project folder as follows:
YOURPROJECT Trunk
Branches
Tags
|
Subversion very flexible
when it comes
to the folder structures used to represent projects. There
are no
folder name requirements put in place by the software but the
common convention is to put 3 special folders inside the project folder
to help keep track of branches.
Trunk
The
Trunk folder is considered to be the main line development.
Based on the development process used the trunk may contain the latest
modifications or the latest clean compile passing the unit tests.
All changes that belong to the core product are
merged into
the trunk eventually.
Branches
Branches
are
usually copies of the Trunk but they could also be copies of other
Branches or Tags. Modifications are applied to this copy so
anyone using the Trunk or one of the Tags is not disrupted by the
changes. Once the modifications are completed and tested the
changes will be merged back into the original folder. Because
branches are fast and easy in Subversion they can be used for
both small and large changes. Once changes are merged you
may
decide to delete the branch depending on your own development
process.
Tags
Tags are
copys of the Trunk made at
a given release. You may have tags for version 1.0
and 1.5
and 2.0 for example. Each Tag represents a copy of the Trunk
at a
particular point in time. This is very useful if you need to
perform maintenance of previous releases.
|
| 5 |
Eclipse
Java IDE 3.1 | Eclipse
SDK
3.1
On the above page click Eclipse
SDK 3.1
 Turn
off your MP3 Player and crank up your DSL. There is a
world of free open source software to download and learn!
|
| A. Unzip the file
into the C:\apps folder. Unzip
the eclipse-SDK-3.1-win32.zip file into C:\apps
B. Make shortcut and start it. Drag a
shortcut of C:\apps\eclipse\eclipse.exe to your desktop and/or
taskbar.
Click
on the new eclipse
shortcut. When
Eclipse prompts you for a workspace enter c:\workspace This can be changed later if
needed
C. set up Ant, and JUnit
To view and work with ant files
you will need the ant view to be displayed. To turn this on from the
main menu select Window,
then Showview, then ant.
Once the ant window
is displayed you can
click on the + symbol to add build.xml files found in your project or
you can drag build.xml files to the view.
For finer control over the
environment
your ant tasks will be executed in try adding ant scripts under the
external tools speed button. In
order to run unit tests from within ant you will need to inform it
where the junit.jar is. This is done from the main menu from Window,
then Preferences, then Ant,
then Runtime. Add the jar
found in C:\apps\junit3.8.1\junit.jar
D.
set up Subversion These
are the same instructions
that should be followed for installing any plugin over http.
If you
are using a proxy server you must first configure Eclipse to use it.
From the main menu select Window then
Preferences then Install/Update. On the lower half check on the Enable
HTTP Proxy Connection box. Enter your proxy server and port. Starting from the main menu
select help then software updates then find and install.
Select the radio button
for search for new features to install
press new remote site
Enter Subversion for the name
and the URL should be http://subclipse.tigris.org/update
Eclipse will find the subclipse
plugin and documentation. Check both the book and subclipse
and pressnext Accept
the license agreement and
press next. Press
finish to begin the
download. When this completes press install all to finish the
installation. | Eclipse
is an open source framework for cross
platform applications. There are many examples
of applications build upon Eclipse found on sourceforge today
but the most well
known of
these is the Eclipse Java Development environment it’s self.
The Eclipse Java development environment is
very
feature rich. It comes with many refactoring and code generation tools
which will become
like second nature to you and
save you
time and frustration the more you use them. It supports all the views
that a
developer would expect, such as class outlines, stack traces, ant tasks
etc but
these features would be expected in any modern development environment.
Eclipse stands alone in its large number of
independently
developed
plug-ins.
There are literally hundreds of free plug-ins for supporting different
programming languages, different version control systems, testing
frameworks,
database inspection and many other useful operations. These plug-ins
are not
all open source and some are of poor quality and many may not play well
with
others but as the community has grown the quality has improved you can
expect
this to continue into the future.
If you are
responsible for a
development team
and have a limited budget it makes no sense to spend thousands per
developer
when you can easily download and install Eclipse for free. As for
support, you
will find that Eclipse is so commonly used that it will be relatively
easy to
hire developers who already know it and if you have any questions there
is a
large online community of users who can help.
The
default Eclipse set up will attempt to put the
workspace folder under your users profile. This may be helpful if your
profile is
mobile
or backed up and it can allow for multiple developers to use the same
PC at
different times. As you do more development you will want to access
your
folders more quickly and easily so the c:\workspaces folder may be
preferable.
Support
this site, Thanks! |
|
Java
is a trademark or registered trademark of
Sun Microsystems, Inc.
in the United States and other countries. This site is
independent of Sun Microsystems, Inc., Apache, O'Reily, Tigris.org,
JUnit.org
and the Eclipse Foundation.
Every effort has been made to ensure this information is
accurate and
timely but JavaNut is not responsible for any losses due to an
innacuracy of this page or any related links. This page
can be copied but a link
back to JavaNut.com must remain with it to ensure readers have access
to
the latest most accurate instructions.
Get a jump start on that new employee documentation for your
business!
creative commons, some right reserved.
Link must remain.
This
work is licensed under a Creative
Commons Attribution-NonCommercial-NoDerivs 2.5 License.
|
|