After downloading BreezySwing, you unzip the file BreezySwing.zip. This file expands into a directory named BreezySwing. Within this directory are the following file and subdirectories:
BreezySwing.jar | The compiled byte codes for the BreezySwing package. |
BreezySwingSourceFiles | The source code for the BreezySwing package. |
BreezySwingDoc | The documentation for the BreezySwing package. |
BreezySwingExamples | Example programs that use BreezySwing |
The file BreezySwing.jar contains the compiled byte codes for the BreezySwing package.
The package must be installed on your computer in such a manner that it can be located by your Java development and runtime environment. There are a number of such environments. The most fundamental is Oracle's free JDK. This environment provides a command line compiler and linker, but not an editor; however, other companies sell or provide for free integrated development environments (IDEs) that include fancy editors, debuggers, and other tools common to sophisticated IDEs.
In what follows, we assume that you have installed the JDK and JRE, version 6.0 or higher, on your computer. Because this version of BrrezySwing was compiled with Java 6.0, it may not work if you are running earlier versions of Java. To check the current version of the JDK and JRE on your system, run the following commands in a terminal window:
javac -version
java -version
We now present a way to install the BreezySwing package so that you can use Java's command-line tools to compile and run programs. While this method may also work for a custom IDE, there is no guarantee that it will, and we encourage you to consult your own IDE's documentation if you run into installation problems.
When you install the JDK on your computer, there are several directories where its system files are located. If you place the file BreezySwing.jar in the appropriate directories, the Java compiler and runtime system can locate it no matter what directory you are developing programs in.
The trick is to locate the right directories for third-party Java packages on your particular system. On MacOS (currently, version 10.10.4), there is one such directory, named by the path System/Library/Java/Extensions. You just drill down that path in the Finder, starting from your hard drive's icon, and copy the file BreezySwing.jar into the Extensions directory. Now you should be able to compile and run Java programs within any directory on your Mac, or do the same with many custom IDEs.
On Windows (currently, Windows 7), there are two system directories in which you must place the BreezySwing package. First, you navigate using the Windows Explorer down the path C:\Program Files\Java. Within the Java directory, you should see two subdirectories. The first subdirectory, prefixed with jdk, contains the Java compiler. The second subdirectory, prefixed with jre, contains the Java runtime system. Navigate in the first subdirectory down the path jre\lib\ext and copy the file BreezySwing.jar into the ext directory. Then navigate in the second subdirectory down the path lib\ext and copy the file BreezySwing.jar into this ext directory. Now you should be able to compile and run Java programs within any directory on your PC, or do the same with many custom IDEs.
Once you have installed BreezySwing on your system, you can open a terminal window (Terminal on a Mac, or DOS Command on a PC) and navigate to the BreezySwingExamples directory. At that point, you should be able to compile and run a Java program that uses BreezySwing. For example, the following two terminal commands should compile and run a program that converts temperature values:
javac TemperatureConvert.java
java TemperatureConvert