TextbooksThere is no required textbook for this course. Since you have some experience with programming, many of you with Java, if you need a textbook you should find one that fits your style of learning. Given how quickly computing changes, evaluating new books is a valuable skill to develop! [an error occurred while processing this directive]Online GuidanceThe API (Application Programming Interface: the standard libraries). Sun Microsystems developed Java and they have a language tutorial. If you have a C++ background the following outline with C++ comparisons might be helpful. [an error occurred while processing this directive]Java Development KitVersion 1.5 (aka version 5) is installed on CDF, and we will use some of the new features of 1.5. To work at home you should download Java SE JDK 5.0 or 6.0. For Linux, Solaris and Windows you can get it from Java SE downloads. You must get the JDK (Java Development Kit), for example, JDK 6.0 Update 2. You do not need the source code. If you already have Java installed just for running some programs but not for developing programs, then you probably have only the JRE (Java Runtime Environment) and not the full JDK; you'll need to get the JDK. [an error occurred while processing this directive]Development EnvironmentsTwo common Java development environments ("front-ends" to the Java Development Kit) used in our courses are DrJava in first-year courses and Eclipse in later-year courses. You may use the Java development environment of your choice to develop solutions to the assignments, but keep in in mind you must submit only the "raw" Java source files you write and they must not rely on any files or code supplied by your environment. DrJavaThe DrJava App is freely available, you should use the current stable release (drjava-stable-20070828-1759). Version drjava-stable-20060821-1502 is installed on CDF and easily accessible from various icons and menus there. Eclipse
Eclipse is also freely available.
Version 3.3 is installed on CDF. You can access it by typing
JUnit Testing FrameworkJUnit is installed on CDF. For your home machine, download JUnit4.4 from JUnit.org (look for Junit4.4.jar). Download it to a directory, perhaps a sibling to your JDK directory. Then, in DrJava, click Edit->Preferences->Resource Locations. In the pop-up window there is an Extra Classpath panel. Add "C:\DIR\junit-4.4.jar" to the Extra Classpath, where "C:\DIR" should be changed to the directory you installed JUnit in. That's it! [an error occurred while processing this directive]Java Style CheckerWe will be using a standardized style for Java code, and encourage students to maintain that style. On a CDF lab machine you can check the style of your Java code against this standard by typing: java -jar /u/jepson/pub/150/RunCheck.jar &in a command prompt window (xterm). The first time you use it you will need to direct it to some other files.
Finally, each time you use it you need to point out some *.java to run it on. Either click on Select java file, or Select the directory of files and select the file or directory you want to process. Then click Run CheckStyle. You can also arrange to do style checking at home by downloading style.zip. In Windows, make a directory, say C:\Java\style and unpack this zip file in it. Then double click on RunCheck.jar Set up the jar and XML files as in steps 1-3 above, but refer to the ones you just unzipped in your C: drive instead. You can then select a file or a directory of files to check, as above. |