Joshua's Java And HP Calculator Site
Home Calculators Notemaker (new)
Java Links Contact
Java

Downloads

Maze Program

FileJoiner

HexViewer


Related

How Do I Get Java?

Java

Downloads

Here you can download some small Java applications that I have written. All of these require a Java Runtime Environment version 1.4.0 or later (downloadable from java.sun.com) These programs have been tested on Windows XP and Peanut Linux 9.3 with the Java2 Standard Edition 1.4.0, but should run just as well on any system supporting the Java 1.4 API.

These applications are provided AS IS as FREEWARE, with no warranty. Contact me if you have any problems.

Follow this guide if you need to download Java.

Maze Program

This program allows you to generate and solve mazes. The interface also allows you to play through mazes against the clock using the arrow keys on the keyboard. The JAR file also contains the source code, and you could possibly use the MazeUtil class in your own programs. (Homepage: http://www.student.uwa.edu.au/~kingj03/maze.html) The program uses a recursive method to solve the maze and so should not be used to solve extremely large mazes (interface limited to 40x40).
Download: Maze Program Release 2, 22 Nov 2002.
How to use Maze Program
To use Maze Program, simply type java -jar MazeExample.jar into a command prompt/console window and follow the interface.

You can generate a maze by using the sliders on the left to change the height and width of the maze and then clicking New Maze... or Generate Maze. If you click New Maze..., you will be asked for the type of maze to generate - use New Maze... if you want to edit your own maze. Then click near a wall to turn it on or off. When you are finished generating/editing, click either Solve Maze or Play. Solve Maze will solve the maze and display the optimum path(s). Play will allow you to play your way through the maze from the bottom left to the top right corner. Click Exit to close the Maze Program.

FileJoiner

This program allows you to concatenate multiple files together using a script. I used this to help me construct some binay files (in combination with HexViewer) which have independent parts, but it has many uses. If you have Linux there are probably better tools for you to carry out this task, but here it is anyway. For convenience, it is provided as a JAR file.
Download: FileJoiner Release 1, 27 Oct 2002.
How to use FileJoiner
To use FileJoiner, you must write a script using any text editor which tells FileJoiner what you want it to do. This is called the command file by the program. Commands are written in the order they are to be executed and must be on separate lines. The first character of each line must be a command character.

The commands currently supported are:
  • D<path>
    Set current directory - Tells FileJoiner which folder to look for the following input and output files in. Path must be absolute and must exist. There must be at least one D command before any I or O commands.
  • I<filename>
    Set next input file - Tells FileJoiner the next input file (which is contained in the directory specified by the last D command). Filename cannot be a path, and the file must exist. The contents of the input file is added to the end of the current output file. There must be at least one D and one O command before any I commands.
  • O<filename>
    Set next output file - Tells FileJoiner the next output file (which is contained in the directory specified by the last D command). Filename cannot be a path. You will be asked if you want to replace the file if the file already exists. There must be at least one D command before any O commands.
  • /<comment> or ;<comment> or '<comment>
    User comment - Tells FileJoiner to ignore the rest of this line - it is a comment for the user.
The typical ordering of the commands is a D command to set the directory, then an O command to set the output file and then multiple I commands to concatenate the files. An example command file is as follows:
;Example FileJoiner Script
;By Joshua King, 27 October 2002.
DC:\My Documents
OBigLongText.txt
IFirstPart.txt
ISecondPart.txt
IThirdPart.txt
The interface of the program is simple. Just run the JAR file, using a command like java -jar FileJoiner.jar and select the command file from the file chooser and the script will be run.

HexViewer

This program is a simple hex editor for viewing (and editing - so be careful!) binary files. It provides a simple interface and allows you to view the file, edit individual values and insert and delete series of bytes. Useful for basic hex-editing needs, but definitely not heavy-duty uses. For convenience, it is provided as a JAR file.
Download: HexViewer Release 1, 27 Oct 2002
How to use HexViewer
The first step is to run HexViewer using a command similiar to java -jar HexViewer.jar depending on your operating system and Java installation. A main window will appear with an empty file. You can edit values by clicking them in the table. The byte offsets of each value are clearly indicated and there is 16 bytes to a line. The options, given at the top of the window are explained here:
  • New... - creates a new file and clears the editor window. You are asked to provide the starting length of the file in bytes. Type the number and click OK.
  • Open... - opens an existing file. Choose the file from the file chooser that appears and click OK.
  • Save As... - saves the current file with a new new. Choose the name and location for the file in the file chooser that appears and click OK.
  • Set Offset - sets the current byte as the reference point for the byte offset calculations shown in the status bar.
  • Insert... - inserts a given number of bytes before or after the current position. Enter the number of bytes to insert, click OK and choose whether to insert before or after the currently selected cell.
  • Delete... - deletes a given number of bytes including the current position. Enter the number of bytes to delete, click OK and click Yes to confirm.
  • Exit - exits the HexViewer application.
There are keyboard shortcuts for each of the above options - simply press Alt + the underlined letter on each button.

Top
The content of this web site was created by Joshua King, 2001-2003. All trademarks are owned by their respective owners.
Last updated 22 November 2002.
Hosted by www.Geocities.ws

1