To compile all the necessary files for the Marine Biology Simulation,
run the following command within the Code folder:
javac.exe -classpath .;.\mbsbb.jar;.\mbsgui.jar *.java
You may need to specify the full path name for the javac.exe file,
such as C:\jdk1.2.2\bin\javac.exe. For your convenience, we have
provided compMBS.bat (for "Compile MBS") in this folder. If you
want to use it, move it to the JavaMBS\Code directory and correct
the full path name for javac.exe. Then run
compMBS
which will run the command above to compile all the Java source
files in the current directory (Code).
To run the Marine Biology Simulation, run the following
command from within the Code folder:
java.exe -classpath .;.\mbsbb.jar;.\mbsgui.jar [target]
where [target] should be replaced by one of the following:
You may need to specify the full path name for theMBSGUIprogram with full graphical user interface (from beginning of Chapter 1)SimpleMBSDemo1simple demo program (end of Chapter 1)SimpleMBSDemo2second demo program (end of Chapter 1)
java.exe file,
such as C:\jdk1.2.2\bin\java.exe. For your convenience, we have
provided runMBS.bat ("Run MBS") in this folder. If you want to
use it, move it to the JavaMBS\Code directory and correct the full
path name for java.exe. Then type
runMBS [target]
where [target] is one of the three classes listed above. This
command will run the java.exe command, setting the classpath. If
you do not specify the target, runMBS will use MBSGUI.
When you go to open an environment data file, the file chooser
window should come up in the Code folder, where the program is running.
You will need to go up to the JavaMBS folder and then down to the
DataFiles folder to find the initial configuration files.
For Chapter 3 (and later chapters), if you are using the Fish.java file
from the DynamicPopulation folder rather than modifying the file in the
Code folder (see FishModsForChap3.txt in the Code folder for more
details), you will also need to execute the following command in
the DynamicPopulation folder:
javac.exe -classpath ..;..\mbsbb.jar;..\mbsgui.jar Fish.java
Then copy the Fish.class file from the DynamicPopulation
folder to the Code folder before running the usual java.exe
command to actually run the simulation. You can copy the compDPop.bat
file from this folder to the Code folder and correct the full path
name for the javac command as you did in compMBS.bat.
Run compDPop from the Code folder. This command will
compile the Fish class in the DynamicPopulation folder
and then copy the Fish.class file to the Code folder.
Then run the Marine Biology Simulation as usual.