|
Java Install Manual |
|
|
|
How to Download and Install Java |
|
First check if you have or don't have java. Even if your system has Java, you want to check you have the the right version. Start the DOS/command window (the black window thing). How to start the DOS/command window? Windows Vista and 7: Left click on the start button on your tool bar. It's the multicolor four flying windows thing. It will open a dialog box and one of the things is a field where you can search for files. In that search box, type "cmd" short for command, without the quotation marks and hit return key. It will open the cmd window (aka dos window) (aka the black window thing). It is called the command window for a reason. You can type in commands. Just for the heck of it type "date" (without quotation marks and hit return key). It should respond with current date-time. The above can also be explained as follows. > The > is a called a prompt. It signifies that computer is listening to your commands. Computer prints it in the command window to tell you it is ready for you (as opposed to being busy working on something else). It may look like > or may look differently (%, $) but it is always signifying that computer is listening. For all commands, you always have to hit the enter key. Since it is always so, I may not even say it. >date //means, at the prompt, type date and hit enter >javac -version //means, at the prompt, type " javac -version" and hit enter One of three things will happen. (a) It prints "Command not recognized" (b) It prints some number different from current version, which means you have old version. (c) It prints the current version. |
|
If you get (a) or (b) you need to install Java on your computer and follow this page. |
|
Java SE JDK (not JRE) software can be downloaded from here http://www.oracle.com/technetwork/java/javase/downloads/index.html You will need to sign License Agreement. The page contains links to install instructions. The page contains links to Java documentation that you may want to use in more advance courses. The website has documentation of the Java API. Informally API is how you can use the classes that the nice people of Java gave us and we don't have to write them. |
|
|
|
After the software is installed, you need to set path. Here are the instructions for some MS Windows OS. |
|
From Julie. ***For
Win 7 and Vista |
|
***Windows XP and *nix and Mac OS: Here is my view. (Same in principle for *nix Mac) Suppose you install your SDK in <full-path-java-install-dir>. In the <full-path-java-install-dir> find path <jdkNNN or similar>\bin (The bin must contain file javac, if not you are in a wrong place.) You need to set up environment for path on the computer. You can do it in two different ways. [non-expert] Start DOS/CMD Window (the black window thing). In it you set up path. The disadvantage is that this needs to be done every time you start working with Java. >set path=%path%;<full-path-java-install-dir>\<jdkNNN or similar>\bin WARNING. If you think you are an expert but you are not, the following is a good way to disable your computer from doing anything useful. [expert] If you are an expert computer person you can set environment permanently as follows: control panel - system - advanced - environment - user variables. Do this. set path=%path%;<full-path-java-install-dir>\<jdkNNN or similar>\bin
For Mac/SUN/Linux, similar idea. |
|
[test of install] After you configured the path using either of the two methods above, you can go and test your installation. >echo %path% It will show the path. Check that path includes path to Java. Go to any other directory than your Java install dir. >javac -version //should show your version >java -version //should show the same version as javac shows End of install. |
|
To get simple manuals. >javac The system will respond with a manual for javac (compiler). If system says, I can’t find javac, the path is not set properly. >java The system will respond with a manual for java (byte-code interpreter) If system says, I can’t find java, the path is not set properly. |
|
Now to really test the java and javac, do the following:
|
|
Copyright All information on this website is copyrighted by Robert R. Silverman, 2002, ... current date. No part of this system or information presented here can be reproduced using any means, such as: book print, physical, electronic, chemical, biological, mathematical, telepathic, or other not yet discovered means without the explicit permission by Dr. Robert R. Silverman, CSU Stanislaus, rsilverman@csustan.edu An explicit permission is given to all my students to copy this material as needed for educational noncommercial purpose.
|