Mandelbrot Madness JAVA!

Version 4.0 -- FAQ (a)

[Return to 3.1 README]

The (a) above indicates that this FAQ has changed from the FAQ accompanying the archived distribution. The version of the FAQ in the distribution has not been updated. Please read on for more information!


What different versions of MMJ! are available?

For detailed information about different versions of MMJ!, see the version history on the official MMJ! site. Roughly, version 1.x was designed primarily to be an applet in a web page; 2.x was meant to be a stand-alone application; 3.1 was a vast improvement on the 2.x design; 4.0 is a complete rewrite that adds a lot more user interface options.

What's changed between version 2.0 and 2.1?

Not much. The biggest change is the addition of a batch mode for processing multiple .MMJ files from the command line. This will let you hand it a bunch of files to crunch on while you go off to do something else. In addition, I fixed a minor bug in the Select Color Dialog that would let the color parts only go up to 254, when they should go to 255. Other than that, it's virtually the same as version 2.0.

What's changed between version 2.1 and 3.0?

A bunch. Here's the expanded list of changes:

What's changed between version 3.0 and 3.1?

Not much. The main additions are the MOB file format and the new Command menu. I would consider the MOB file reason enough to upgrade.

What's changed between version 3.1 and 4.0?

A lot. The entire user interface has been rewritten to use the Java Foundation Classes (JFC, also known as Swing). Here's a few more important changes:

How do I upgrade to the latest version?

There isn't an "upgrade" option, per se. You'll pretty much have to wipe out the old version and install the new. This is pretty simple, though. First, back up any parameter files, images, batch files/shell scripts, etc., that you may have written. Then, delete everything in your MMJ! directory (including the documentation directory). Install the new version, then return your backed up files to the directory.

Why upgrade? There are a number of new features incorporated in version 4.0. Plus, why settle for an older version when you can have the newest? :)

Windows users: Note that it's now a lot easier to install MMJ! Instead of downloading the platform-independent ZIP file, download the Win32 installer version of the distribution. This setup program, built with Inno Setup, will take care of most of the grunt work for you.

How do I install MMJ!?

Installing MMJ! is relatively simple, but it does take a little bit of work. Check the README file that came in your download distribution, or take a look at the install portion of the documentation. While MMJ! was designed back in the day when single-user setups were the norm for home systems, it can theoretically be set up for multiple users with a little bit of know-how.

Windows users are encouraged to download the Win32 installer version instead of the platform-independent ZIP file. This version, built with Inno Setup, will take care of most of the grunt work for you, such as creating icons, putting files in the appropriate places, etc. Note that it also checks to see if you have a Java virtual machine installed; if you don't the installation will fail. Currently, it only checks for Javasoft's JRE and JDK, or IBM's JRE; if you have a JVM from a different vendor, it won't be detected. If this is the case, fret not; just download the platform-independent ZIP file and install it the old fashioned way. (Or, you can help us find out how to detect your vendor's JVM, so we can make it easier for others.)

Can I run MMJ! from within my Web browser?

MMJ! is a Java application. It is not an applet. There is a big difference. By itself, MMJ! must be run using a Java runtime environment. Previous versions of MMJ! could run as an applet with some features disabled after a little coaxing, but 4.0 was rebuilt from the ground up. It no longer has the functionality to work as an applet. Version 3.1 does have this functionality, so the rest of this question applies to that version.

I have included a small applet on the page mmj.html with the 3.1 distribution that will present a button that will launch MMJ! using your browser's virtual machine. Your browser must support Java 1.1 or higher in order for this applet to launch MMJ! If you do not have Java 1.1, it will display an error message.

There are a number of things to consider about running MMJ! from a Web browser. MMJ! has a number of features that involve file operations (open and saving files). Most likely, these operations will be disabled. Since MMJ! is being launched from a Java applet, it will be treated like an applet and be constrained by a number of security limitations. These limitations include an inability to access files on your drives.

The MMJ! launcher applet has been tested with the following browser and operating system combinations:

Why do I need a Java virtual machine to run MMJ!?

Because that's just how Java works. In order for Java to be platform independent and run on so many different machines, there must be a level of abstraction. This is obtained by running a program called a virtual machine (VM). A VM simulates a computer machine that lives only to run Java programs. Your computer cannot, by itself, interpret and execute Java bytecodes (machine instructions). It requires a VM to read the bytecodes, translate them to instructions native for your computer, then execute them. If a Java VM is created for (ported to) your platform, then you can run Java programs unmodified.

This is essentially what your Web browser does when it downloads an applet. It has its own VM built in. A runtime environment is simply a stand-alone VM that operates outside of the Web browser. This lets you run more complex programs with fewer security constraints (like letting you access files on your hard drive). As stated above, you can run older versions of MMJ! from a Web browser, but it will be limited in its functionality. With a VM, these restrictions will not be enforced. Version 4.0 cannot be used within a browser; it must be run from an installed VM.

What Java virtual machines can I use to run MMJ!?

Just about any Java virtual machine (i.e., runtime environment) that is Java 1.1 compatible or higher will work. You just want to get the right one for your platform. :) There are far too many VMs to list, but I can recommend a few. While there is a list of download locations on our web site, they are repeated here for convenience, plus comments:

Note that the Windows installer distribution will look for the Javasoft or IBM JREs/JDKs. It will not look for other JVM vendors. If you use another vendor's JVM, either download and install the platform-independent distribution, or contact us so we can update the installer to search for your vendor's JVM.

Can I use MMJ! on my web page?

Version 4.0 cannot be used as a Java applet; see above for the detailed explanation. Thus, you can technically include the binary distributions on your site, but not a working applet. We would prefer, however, that you simply link to our site instead and let folks download the program from there. Previous versions of MMJ! can work within a browser, so the rest of this question pertains to version 3.1, which is still available for download.

Yes, you can included MMJ! 3.1 on your site, provided you follow some conditions. Included in the distribution is a file called WebMmjBtn.class, which is a small button applet similar to the one found in the mmj.html file. This is the file provided for running MMJ! within a Web browser. The WebMmjBtn.class applet will run MMJ! with all file, printing, and copying operations disabled automatically, just like the demo on our Web site. You can use this to fire up MMJ! on your personal web site. However, I would like to ask that you abide by a few rules. Please give credit where credit is due; do not claim MMJ! as your own work. Please provide a link back to the official MMJ! web site at http://www.gpf-comics.com/dl/mandel/java/. I strongly suggest placing all the class files in a JAR archive to help speed up the download time of the applet. (The JAR archiving tool can be found in the JavaSoft JDK package at the JavaSoft web site. When building your APPLET tag, use the following: <APPLET CODE="WebMmjBtn.class" ARCHIVE="Mmj3.jar" WIDTH=200 HEIGHT=75> and use whatever JAR file you make in the ARCHIVE attribute.) You can safely delete all files associated with PaletteBuilder from your JAR archive, since PaletteBuilder will be useless as an applet (it lives to manipulate files).

If you wish to make MMJ! available for download, please put the full distribution archive online unchanged from how you downloaded it.

Another alternative to all this is to use the old version 1.1 applet, still available at our web page. It is more compact, has smaller files (thus a quicker download time), and not all the extra features of the current version. It is much more suitable for quick online exploring, where as the current version is more suited to long, involved searching.

How do I run MMJ! in batch mode?

MMJ! can be run in two modes: the familiar GUI (graphical) interactive mode or a new command-line driven batch mode. For more information on the batch mode, see here.

Does the batch mode mean I can now run this thing on my character-only system?

No. MMJ! still uses the Java AWT (versions up to 3.1) or JFC (4.0), even in batch mode. In other words, there is actually an invisible window on your desktop doing the batch processing. Thus you can't run the batch mode strictly from a DOS, UNIX, etc., prompt without loading Windows, X, etc. I would suggest opening up a command window and letting it run there. (UNIX users: You may not want to run it in the background (&) and keep using the same window, because MMJ! prints status messages as it goes that may interfere with what you're doing. You may be able to redirect this output to a file (see your shell's man pages), but I haven't tried this. It may be eaiser just to go into X Windows and open up another term window and work over there.) (Note: I have managed to confirm this in Linux. When running the batch mode outside of X Windows, Java crashed, complaining about not finding the X server.)

How do I convert my 3.x parameter files back to 2.x?

By default, MMJ! 3.x and up writes the .MMJ parameter files in a new format that is incompatible with files created by 2.x. This was necessary to add support for zooming in Julia sets. 3.x and up includes a utility to convert 3.x files to 2.x files. More information can be found here.

What's the deal with this new MOB file stuff?

The MOB file is an alternate form of parameter file. It combines all the information of the .MMJ parameter file and the .PAL palette file into one compressed binary file. This had advantages and disadvantages, but it is the recommend format for sharing parameter files between folks using version 3.1 and up. I strongly suggest you read this to bring yourself up to speed on the issues.

Why don't you just save parameter information in the image files like FractInt does?

Well, for one thing, this isn't FractInt. :) Actually, I thought about it. It would be a great way to combine saving the image information and parameters in one compact unit. Unfortunately, Java didn't (at the time) have the capability to read the extra blocks of the GIF98a specification, which would be needed to store such information. Also, the GIFEncoder classes did not write to GIF98a, either. The same is essentially true with Java's PNG support and the PNGEncoder classe we used for writing PNGs. And saving the parameters and the palettes by themselves, without the image, takes up much less space.

If you've never used FractInt, consider it highly recommended. It has also been ported to several different platforms. Personally, I find MMJ! a lot easier to use, but FractInt is much more versatile and can handle many more fractals than just the Mandelbrot and Julia sets.

MMJ! runs incredibly slow! How can I speed it up?

Fortunately, this isn't as big of a problem as it used to be. However, the following is good general information to keep in mind when dealing with both Java and fractal generation:

When it comes to speed in MMJ!, you could have two major factors going against you. First of all, Java itself can be relatively slow. Although faster processors and better virtual machines are making Java much faster, there is still a huge difference between native executable code and interpreted Java code. JVMs have gotten better over the years, however, and they're definitely closing the gap. Of course, getting a faster computer might help too....

The second major problem is the fact that fractal generation is slow. Many of us who have joined the computer world only recently don't fully appreciate the old days, where generating a fractal was an overnight exercise (if not several days!). The only thing I can suggest is be patient. You can speed up part of your process by creating small resolution images at low iteration rates, then "upping" these values when you come across something you want a better look at. Having a Windows Solitaire session (or similar time-wasting mechanism) open at the same time might help the boredom somewhat.

Part of my image disappeared when a window overlapped it!!!

Don't panic. This is a quirk of the Java AWT (Alternative Window Toolkit). While MMJ! is rendering an image, it is possible to apparently erase parts or all of the image by minimizing it or overlapping it with another window. Fortunately, MMJ! draws the image both to the screen and to an off-screen copy. The off-screen copy is unaffected by such actions. When the image is finished rendering, the on-screen window will be refreshed, and the full image will be displayed. (Note that this problem doesn't seem to occur on all platforms.)

I get junk all over the window while the image is being rendered!!!

If my guess is right, the "junk" you're seeing looks like whatever was behind the window before it opened, or if you moved another window over this one, it looks like the contents of the other window. This is the same problem as above, only you're probably using a different Java virtual machine. Again, wait until the image is finished, and you will see that there's nothing wrong. (Note that this problem doesn't seem to occur on all platforms.)

Why do all the windows appear in the top left corner?

They shouldn't anymore. If all of the windows appear in the upper left corner of your screen, you must be using version 2.x of MMJ! Version 3.x corrects this problem; most dialogs appear in the center of the screen now. (Image windows you create do not, however. They still appear in the upper left corner.) Version 4.0 uses the Java MDI (multiple document interface), so all your image windows will be contained within the main MMJ! window. I strongly suggest you upgrade.

MMJ! can't read a parameter file that I know is good!

Most likely you are using an old 2.x version of MMJ! and trying to read a 3.x version file. Unfortunately, 2.x cannot read the new 3.x .MMJ file format. I suggest you upgrade to version 3.1 or higher. Alternatively, you can have a friend who has 3.x or higher to convert the file to the 2.x format.

Why can't MMJ! find the PAL file associated with my MMJ file?

The .MMJ parameter file does not save any sort of path information associated with a .PAL palette file when it stores the palette file's name. This is because different platforms use paths differently, and storing a path may cause shared .MMJ files to work improperly on other platforms. Therefore, when MMJ! opens a .MMJ file, it assumes that if a .PAL file is specified it will be in the same path as the parameter file. Try moving the .PAL file in the same directory as the .MMJ file.

Another possibility is that you didn't save the palette with the parameters. See the next question.

Still yet another possibility (if you're using version 4.0) is that your palette file isn't in the default palette file directory that you specified in the Options menu. See this question for more details.

MMJ! says that no palette was specified in my parameter file!

MMJ! does three things with palettes when you save a parameter file. If you use the internal Rainbow or Grey Scale palettes, that will be specified and the proper palette will be restored when the parameter file is loaded again. If you loaded a palette from a file, the palette's file name is saved, so MMJ! will attempt to load that file when the parameter file is opened again. Lastly, if you created a custom color scale palette, you will be given an opportunity to save it to a .PAL file. If you choose not to, MMJ! will record that no palette was saved. If you load this parameter file later, MMJ! will see this and default to the Rainbow palette.

Another possibility is that your palette file is somewhere that MMJ! can't find it. See the previous question.

The context (pop-up) menu doesn't work!!!

The context (or pop-up) menu does work; your Java virtual machine has a bug in it. For a long time, I thought this was my fault, until I upgraded to JavaSoft's JDK 1.1.7B. Suddenly, my context menu was working perfectly. If you use the JavaSoft JDK or JRE of any version before 1.1.7B, and the context menu displays funny (like no text and maybe expands all the way across the screen), then I suggest updating your virtual machine. I don't know when this was fixed, so getting the latest version should cover all the bases. I don't know of any similar problems with other virtual machines. (And don't report this to Sun, they already know about it!)

Note that this error has also occurred when MMJ! was launched using various Web browser versions. See above for more information.

Help! I don't have a command line! How do I run these utilities?

You're in luck, because starting with version 3.1, all the command-line utilities are now available through the Command menu. So, if you own a Mac or just don't feel comfortable typing in options and file names, you can use the GUI to perform all of these tasks. Only the batch mode is not available through the GUI.

Why can't I run PaletteBuilder from my Web browser like I can MMJ!?

There's no point in it. :) PaletteBuilder's whole purpose is to manipulate files. Since you cannot manipulate files while running in a web browser's "sandbox," PB would be pretty much useless there. So no launcher applet is provided for it. (See above)

Can PaletteBuilder read/write the palettes in MOB files?

No. PaletteBuilder works only with Jasc PAL files. The palettes stored in MOB files cannot be read or written by it. You can "deMOB" the file and extract the palette, however.

Why are the "helper apps" buttons and menu items grayed out?

You haven't specified your helper applications yet. Go to Options, then Helper Apps.... You will see two input boxes with Browse buttons next to them. Either type in the path to the executable for your Web browser or image editor, or click the Browse button and navigate your file system until you find the program. Note: This is specific to version 4.0.

How do I make MMJ! default to the same or different directories for all my image and paramter files?

Go to Options, then Directories. You will see a tear-away menu with three items, each correpsponding to a specific directory. Each one will let you set the default directory for MMJ! to look for that type of file. This way, you can keep your user files out of the program directory, or even separate parameter files from palette files from image files. The organization is up to you. Note: This is specific to version 4.0.

Changing the look & feel in MMJ! doesn't seem to affect PaletteBuilder.

PaletteBuilder was not built using the Java Foundation Classes, so it is unaffected by the Look & Feel system. Note: This is specific to version 4.0.

The help system seems to be broken in version 4.0.

We know. This is one of those unresolved bugs that we never got around to fixing. The help files are simply HTML documents located in the "help" directory under your installation directory. Just open the index.html file in your favorite Web browser and you should be fine. Note that the Windows installer will also create a shortcut to this file in the same Program Group as the main program's icon; if you installed MMJ! this way, use that icon instead. Also note that the help files are unfinished, so you may reach the occasional dead end.

Where can I view the latest version of this FAQ?

It's quite possible that this FAQ has changed dramatically since you downloaded this distribution. Fortunately, you can always find the latest version of this FAQ at http://www.gpf-comics.com/dl/mandel/java/docs/faq.html. I will try to keep this up-to-date, even when the FAQ in the distribution may not be.

[Top]

[Return to README]

Last updated December 15, 2005.
© Copyright 2005, Jeffrey T. Darlington. All rights reserved.