CS1163 PROGRAMMING IN JAVA

braintreesmileΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 5 χρόνια και 1 μήνα)

293 εμφανίσεις

CS1760 ADVANCED OBJECT
-
ORIENTED
PROGRAMMING


Installing and Setting Up Java


The current version of Java is called Java SE Development Kit (JDK) 6.0 and can
be downloaded from



http://www.oracle.com/technetwork/java/javase/downloads/index.html



Make sure you install the JDK not the JRE.
If you wish you can also
download the NetBeans IDE.



Important Note

In order for Java to compile and run programs from any directory

you should
set
the PATH variable
. This directs the compiler where to find the java executables.

These should be in the bin folder inside the Java folder. The full path should be
something like
:
C:
\
Progr
am Files
\
Java
\
jdk1.6.0_23
\
bin


To set the PATH va
riable permanently you need to find the Environment
Variables in Windows. This is usually done using Control Panel


System. Add
the path to the right end of the "Path" in the User Variables. A typical value for
PATH is:



C:
\
Program Files
\
J
ava
\
jdk1.6.0
_23
\
bin


Capitalization doesn't matter. Click "Set", "OK" or "Apply".


The PATH can be a series of directories separated by semi
-
colons (;). Microsoft
Windows looks for programs in the PATH directories in order, from left to right.

You should only have o
ne bin directory for a Java SDK in the path at a time
(those following the first are ignored), so if one is already present, you can
update it to

jdk1.6.0_
23
\
bin
.


More information on installation here:


http://www.oracle.com/technetwork/java/javase/index
-
140291.html


If you still cannot get a program to compile and run you may also need to set the
CLASSPATH variable.


Other Information

You need to use an IDE to write your Java

programs
. Three possible IDEs are
NetBeans

from the Java site,
Eclipse

a popular open
-
source IDE available at
http://www.eclipse.org/downloads
, or
JCreator LE
, a good simple free IDE which
you can downloa
d from
http://www.jcreator.com/




Browse/download documentation:
http://download.oracle.com/javase/6/docs/index.html

Java API:
http://download.oracle.com/javase/6/docs/api/index.html