Java compilers, editors, example programs,
and some links to documentation
Updated September 27, 2007
Java Compilers Looking for a Java compiler? This is a page of links to all the Java compilers and IDEs. Take your pick.
Web Servers These are servers that you can use to run Java Servlets and Java Server pages.
~~~~~~~~~~
Clearing Up Some Confusing Things About Java
~~~~~~~~~~
Example Java Programs
Sometimes nothing will do except seeing a small example to figure out how
something works.
These are small example Java programs.
~~~~~~~~~~
List of All Methods
If you remember the name of a method but don't remember where it is, or
if you want to find other locations of a method, you can look in this list.
This is an alphabetical listing of all method names and the classes
in which a mehod of that name is defined.
You may find some surprises in here. For example, a method named 'write()'
occurs in 186 classes. And there are 91 methods that begin with
the word 'write...'.
~~~~~~~~~~
Getting Set Up
- Setting the PATH variable. If you want to use the command line form of Java (or the command line form of anything else, for that matter) you will need to set the PATH variable. This is an explanation of the PATH variable and some procedures you can use to set it. Don't worry. It isn't hard, but if you are new to it, it may be confusing at first. Just take it one step at a time and it falls right into place.
- Setting the CLASSPATH variable. If you are not sure what the CLASSPATH variable is and how it should be set, then don't set. And you certainly shouldn't set it until you read this. You may not want to set it at all because you need it only for special circumumstances.
- Ant. This is a Java build tool. It is sort of like the make tool, but it understands the relationships of Java classes. You edit Java programs using your own text editor and Ant can be used to check the dependencies and compile only the classes that need to be compiled to update the program or programs.
-
~~~~~~~~~~
Documentation
You cannot write Java programs without either a good API reference or the most fantastic memory on the face of the Earth. It is important for finding classes that can do things for you, and it's good for figuring out how to talk to objects of those classes.
~~~~~~~~~~
Questions and Answers About Java
Working with Java can cause you to have questions. Lots of questions. There are a number of Web sites designed to help answer these questions. Some have lists of questions and answers, others have places where you can post questions and have them answered. I know that this list does not include all the sites that do this, but I have checked these out and they seem to be very useful.
~~~~~~~~~~
Other Java Sites
- Certification This is the sun Web site that explains the levels of certification. Basically, the certification is in two levels. The first level is the Sun Certified Programmer and the second level can be any one of six specialties. As a prerequisite, you must be certified at the first level before you can become certified in one of the specialties.
- Gnome-GCJ - Bindings for GTK+ and Gnome in Java/GCJ
- JavaCC This is an open source (BSD License) Java parser generator. It is for use in writing compilers for Java.
~~~~~~~~~~
Text Editors for Windows
To write Java source code you can use any program that will produce plain ASCII text. With the Windows operating system this can be a problem. Included with the Windows installation are the editors named EDIT and Notpad. Either of these will work. In fact, if you prefer, you can use your word processor, just as long as the text is saved in plain ASCII character text.
But there are better ways.
The following is a list of links to Windows text editors that you can download from the Internet. These editors are quite advanced, and each one of them has some built in facilities to help you with programming. This is not an exhaustive list of text editors in existence for Windows, but all of these have been recommended one or more Java programmers. I'm not promoting any one of them, so they are listed here alphabetical order.
You should be warned that a text editor is sort of a religious thing. Just because a text editor may be good for one person doesn't mean it's any good for another person. Also, you will find that a person who has used a text editor for a while becomes attached to it and will not even consider another editor. The same thing will happen to you. It happened to me--I have an old simple editor that I have used for years and have no intention of changing.
~~~~~~~~~~
Some Hints About Writing Applets
A Quick Web Browser Test
This is a link to a simple page that contains an animated Java applet. It is intended for you to test your Web browser and make sure Java is installed and working.
Use the Appletviewer
Using a Web browser when developing an applet is difficult and can cause unexpected results. For one thing, it will hold old versions of the applet in its cache and show that to you instead of your new one. (You can usually force a reload of the new applet by holding down the Shift key while selecting Reload with the mouse.)
If you use the appletviewer it will always show you the current version of the applet. Also, if the HTML and the applet both work in the appletviewer, they will also work in every browser that has Java installed.
A Most Common Problem
The most common problem with applets is in the spelling of things. The name of the applet must be exactly the same as the file that contains it. For example, an applet named Goober must have its source defined in a file named Goober.java. The name in the HTML must be spelled exactly the same as the name of the applet itself. And upper and lower case count throughout. This can be tedious before you get used to it, but there is a reason for it, and that reason becomes apparent when you write larger and more complicated programs.
~~~~~~~~~~
The Queens Problem
Those of you enrolled my second Java course are given this problem at the beginning of the course, but you are not given the solution. The reason I did this is because, when I was first learning programming, the problem was given to me this way (no solution) and it haunted me for months until I finally worked out it out in FORTRAN. This was a long time ago. Working the problem taught me a lot about the basics of computing. This link explains the problem the provides a solution. It is a solution, not the solution. Everybody works it in their own personal way. And so should you.