How to configure MapTool to report error messages

Articles on how to do things in MapTool (answers only here -- questions should stay in the main MT forum)

Moderators: Azhrei, dorpond, trevor, giliath, jay, Mr.Ice

Forum rules
Please discuss all HOWTO topics in the main forum. They will be moved here by a moderator when appropriate.
Locked
User avatar
Azhrei
Site Admin
Posts: 12050
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

How to configure MapTool to report error messages

Post by Azhrei »

Users will often describe a problem with MapTool and one of the first things they are told is to run MapTool again with the error messages in a text window so they can copy/paste them into a posting here on forum. This question seems to comes up often, so here's a description of how to configure MapTool to provide the answer.

First, MapTool is incrementally having its code modified to use a standard log file. This file appears in .maptool/log.txt under your home directory. Your home directory is different depending on your platform; please check the README file in the downloaded ZIP file for details or simply search your system for that filename. The log file may not contain every single warning that can be generated by MapTool (yet) and in those cases, the following steps will be useful. Note that you are welcome to copy/paste the message from the Details button on any error dialog that pops up. (The details apply just to the current error, while the log.txt holds all errors that have happened. Sometimes the earlier errors can help pinpoint the cause of later ones, so attaching the log file is preferred. But please empty that file before recreating the problem and posting the attachment.)




There are two ways to turn on the Java Console (actually, there are probably more than that, but I'm going to describe two).

If you are using the WebStart version of MapTool:

To turn on the Java Console you need to change the WebStart preferences.

On Windows, that means going to the Control Panel and selecting Java, then the Advanced tab. There you should be able to expand the Java Console entry and choose the Show Console option. Once chosen, any Java application executed via WebStart will cause the console to open.

On OS X, use Finder to open the Applications folder. Under Utilities will be a Java subfolder. Look in there for the version of Java that you wish to configure (OS X can have Java 1.4, Java 5, and Java 6 all installed at the same time, each with its own folder here). Inside whichever folder you select is an icon for Java Preferences. Activate it and select the Advanced tab. Expand the entry for Java Console and select Show Console. Once chosen, any Java application executed via WebStart will cause the console to open.

On Linux, the location of the Java Preferences will depend on the window manager you're using. Under KDE it will likely be in the Control Center or an option under the Internet submenu. Once you find it, activate it and select the Advanced tab. Expand the entry for Java Console and select Show Console. Once chosen, any Java application executed via WebStart will cause the console to open.

If you are using the ZIP version of MapTool:

On Windows there are multiple batch files with different memory configurations predefined. Activating those batch files normally starts up MapTool using the javaw.exe program. In order to see the error messages, a different program must be used. To change the program you should open the batch file of your choice (based on the memory size you want Java to allocate) and edit the last line (or close to the last line) that starts with javaw and replace that one word with java (in other words, remove the w off the end). Save and exit the file. Now when you activate the batch file you'll get a console window that you can use to copy/paste into a forum post.

On OS X there is a single script for launching MapTool. It's name will end with .command. When you activate that file (by double-clicking on it, for example) a new Terminal window will open and the contents of the file will include a status message or two and then any error messages that occur. If you receive an error that the file cannot be executed because it doesn't have the correct permissions, you will need to add execute permission. Unfortunately, that cannot be done through the GUI (Finder doesn't have support for that for some reason!?). So you will need to open a Terminal window (found under Applications -> Utilities) and run a command. This command will change the permissions to include execute. Type the following text into the Terminal window. Note that there is a space and the end, but do not press Enter.

Code: Select all

chmod +x 

Now find the .command file in Finder and drag the icon into the Terminal window. This will cause a long string of text to show up in the Terminal window -- that text defines the exact location of the file. Return back to the Terminal window and press Enter. That will cuase the chmod command to be executed. When that's complete, you can try activating the .command file again and it should work this time. If it doesn't, try the chmod technique again. If it still doesn't work, create a new thread in the MapTool forum and describe the problem.
What the Terminal window will look like after executing the chmod command
What the Terminal window will look like after executing the chmod command
Terminal Window.png (36.1 KiB) Viewed 7942 times

On Linux there is a single script for launching MapTool. It's name will end with .sh. When you activate that file a new terminal window will open and the contents of the window will include a status message or two and then any error messages that occur. Just like in the case of OS X, if you get an error that execute permission has been denied, you will need to right-click on the icon and choose the option that let's you change the permissions. It might be under Properties... or it might be called something else in your window manager. After adding execute permission, try double-clicking the icon again. If it still doesn't work, create a new thread in the MapTool forum and describe the problem.

Locked

Return to “How To”