1.1
Updates:
- none
Installing Java on your Computer
Java is a programming language that runs on virtually every computer. You
write Java programs in an editor, save them to disk as .java files, and then
byte-compile them with the javac compiler (e.g., in Windows this is
javac.exe) to produce .class files. The .class files are loaded and run in a
Java Virtual Machine, called the JVM (windows=java.exe). Since the JVM runs
everywhere, Java can run everywhere. You can even write and compile Java
programs on Windows and run them on the Mac (and unix), and vice versa.
The Java Development Kit (JDK) allows you to develop Java programs. The Java Runtime
Environment (JRE) allows you to run Java programs. The JDK includes the JRE. If you only need
to run java programs, you can just install the JRE. Either is
fine.
Installation steps
- Note, Java adminstration, in my opinion, is needlessly complex and
unfathomable. In any normal world, new releases of a product would have an
orderly progression of release numbers: the later the number, the more
current the release. But this is not always true with Java. For example,
on the one hand, Java 8 is very old, and we've been directed to remove it. On the other
hand it is the current 2021 release. For our class, most any Java version
will do fine. But don't expect things like version numbers to make much
sense.
- For windows you can use the link
here ) and run the installer. Be sure to download Java for the operating
system you are using: Windows, Mac or Linux.
I have generally found Mkyong.com to be an excellent site for programming
tips. Mykyong has Mac Java
Installation instructions that may be helful. I followed the directions
on this page to install Brew on the Mac, then used Brew to install
Java on the Mac without any problems.
He also has
General tips about Java
installs.
This link will probably
also work.
- Or, Use Google to search for help on installing Java on your computer.
- You can get help installing Java on your computer from the
CDM Tutoring Center.
- The DePaul computing labs have tutoring help and most computer science students can
help you install Java on your computer, including with YouTube videos.
- All the DePaul lab computers have Java installed on them.
- Sample YouTube Video for
installing java.
- Trouble usually comes with trying to get the path to your Java programs sorted out. You
should be able to type "> java -version" at your terminal window prompt and get a listing of
your Java version. If so, you have successfully installed Java.
- Many people use an
Interactive Development Environment (IDE) to write Java programs. Two
popular ones are IntelliJ and Eclispse. However you can also just use a text
editor like emacs (anywhere), Notepad++ (on Windows), Atom (everywhere), and TextEdit (Mac) for
simple editing of files and execute "> javac MyFile.java" to compile your
programs. You DO NOT need to install and learn an IDE to run java.
- Java is continually being updated to new versions. You probably want to select the most current, but
stable release.
If you are working without an IDE, on Windows use Windows-Key / cmd to bring up a terminal
window. You can run java programs by typing "java MyProgram" at command
prompt. If you are using java to run ABCL LISP you would type "java -jar
abcl.jar" (assuming the abcl.jar file is in the same directory).
If you are working on the Mac, everything is the same. Do one
of the following: Click the Launchpad icon in the Dock, type Terminal in the
search field, then click Terminal. In the Finder , open the
/Applications/Utilities folder, then double-click Terminal. In Spotlight,
type Terminal.
Resources