Previous Next        Current Page: NeXtMidas User's Guide / FAQs
Release Information   
Getting Help   
Basic Concepts   
Result Parameters   
XML Support   
System Operation   
Applets and WebStart   
X-Midas Interoperability   
Third-Party Compatibility   
Installation and Customization   
Running NeXtMidas Independently   


Answers to Frequently Asked Questions (FAQ) about NeXtMidas are organized into the following categories:

NeXtMidas Installation / Configuration

How do I increase Java's memory size for my application?
To increase either the Java Virtual Machine's (JVM) initial (heap) memory and maximum (heap) memory size:

JVM memory modifying arguments (-Xms for initial heap size; -Xmx for maximum heap size) are specified in the NM_USER_JVM_FLAGS environment variable. These examples increase initial memory to 128 MB and maximum memory to 256 MB:

  • Unix
    setenv NM_USER_JVM_FLAGS "-Xms128m -Xmx256m"
  • Windows
    set NM_USER_JVM_FLAGS=-Xms128m -Xmx256m

When I run the CONFIDENCE tests after installing NeXtMidas I get a number of "Could not find file" errors and failed tests. Is there something wrong?
Many tests rely on the first disk auxiliary (AUX) for the read/write tests. By default this is set to /midas/data1/+/ (NeXtMidas translates the "+" to be your user name). If this directory does not exist, or you do not have read/write permissions for it, you need to change the value of AUX.1. To do this, create a file (which NeXtMidas automatically loads at startup) that looks similar to this:
  info "Loading Personal Startup File"
  set U:AUX.1 "/midas/data1/+/"
Substitute the /midas/data1/+/ for the location of your data file directory. (See $NMROOT/nxm/sys/cfg/ for details.)
What do I need to fix to avoid the following error when compiling NeXtMidas 2.0.0?
WARN: /home/smith/nxm200/nxm/sys/lib/ warning:
as of release 1.5, 'enum' is a keyword, and may not be used as
an identifier
(try -source 1.5 to use 'enum' as a keyword)
  public int enum() {
First off, if you read the "error message" it's not actually an error, just a warning that Java 5 added the keyword enum and deprecated all uses of enum as a method or variable name. Since NeXtMidas is set to compile in Java 1.4 mode ("-source 1.4" and "-target 1.4") you can safely ignore this warning.

Please see the "NeXtMidas 2.0.X Release Notes" for more details.

The Table.enum() method has been removed from NeXtMidas 2.1.0, so this warning message should not appear in any of the newer versions of NeXtMidas.
Why do I get the following error when I start NeXtMidas?
Shell.loadLibrary err: java.lang.UnsatisfiedLinkError:
/home/smith/nxm200/nxm/sys/lib/ cannot
open shared object file: No such file or directory.
First verify that the file exists, if it does not exist then either NeXtMidas did not build properly (unlikely) or someone deleted the file, the fix is to rebuild NeXtMidas. If the file does exist then there are two probable causes:
  • NeXtMidas was built using another system (usually via a NFS mount or a shared drive) and the resulting binaries are incompatible with your OS, or
  • NeXtMidas was built with an unsupported version of Java, please see the NeXtMidas release notes for more details.
  • Check to see that the copy of the JDK installed matches the hardware (i.e. a 32-bit version of the JDK will not work properly on a 64-bit system -- if you copied the JDK from another platform this may be the problem).
I have NeXtMidas versions 1.8.2 and 1.9.2 installed on my system, but when I switch between the two I get strange errors. Can I safely use both versions of NeXtMidas at the same time?
Yes. There should be no problem with using multiple versions of NeXtMidas at the same time, however it is highly recommended that you open separate xterm/console windows for each version of NeXtMidas. Using separate windows for each version of NeXtMidas will avoid any conflicts between the environment settings used by each of the versions.

Also be careful when changing the setting of $NMROOT since some shells will not properly update your alias for nmstart.
When using NeXtMidas in Windows, can I install NeXtMidas on one drive and store my data files on another drive?
Yes. However, NeXtMidas assumes the drive letters are the same (unless otherwise specified) and you need to tell NeXtMidas which drives to use. To do this, create a file (which NeXtMidas automatically loads at startup) that looks similar to this:
        info "Loading Personal Startup File"
        set U:AUX.1 "Z:\midas\data1\+\"
        set U:AUX.9 "C:\midas\icedisk\"
Note: This is identical to the lines in $NMROOT/nxm/sys/cfg/ except for the addition of the drive letters.
With what versions of Java is NeXtMidas compatible?
This is listed at the top of the release notes for each version of NeXtMidas.
Can I use IBM's Java compiler with NeXtMidas?
Some users have been successful with IBM's version of the JDK on RedHat Linux. However, the NeXtMidas developers can only officially support the versions from Sun Microsystems ( The only exception to this is the JDK for the Tru64 platform (which is only released on the Tru64 web site).
Which C/C++ compiler should I use when building native code for NeXtMidas?
Most widely-available C/C++ compilers work. NeXtMidas uses the GNU C Compiler (gcc) as the default compiler on Linux and Solaris. Most Linux users will find that gcc comes pre-installed with their version of Linux. The GNU C Compiler is available for most platforms from at no cost.
Which Fortran compiler should I use when building host primitives for NeXtMidas?
Please see the XBC section in the NeXtMidas User's Guide for details.
My Unix system does not have a C/C++ compiler installed, can I still install and run NeXtMidas on this system?
Yes. Before running nmstart, change the nmmake.bldswitches property in $NMROOT/nxm/sys/cfg/build.props to /DONATIVE=FALSE, and set the environment variable $NM_USER_JVM_FLAGS to NONATIVE=TRUE. This will enable you to compile and run NeXtMidas in "No Native" mode where only the Java libraries are used.
When I try to run NeXtMidas on my Unix system, I receive an error that a "variable name is too long". How do I resolve this error?
The cause of this error is due to a environment variable name character limit (16) in some versions of csh. In order to resolve this issue, you will need to redirect csh to use tcsh, which does not have said character limit.
$ cd /bin
Make a copy of the original csh.
$ cp -p csh csh.orig
Create a symbolic link from csh to tcsh.
$ ln -s tcsh csh
Ensure that the symbolic link was created properly.
$ ls -l *csh
You should now see that the csh script points to tcsh. Rerun NeXtMidas.

Using Plot, Layers and Features

When I move a feature (see code below) in NeXtMidas 2.3.0 it draws the feature in the new location, however it is still drawing the feature in the old location. What's wrong with my feature, I thought this worked in NeXtMidas 2.1.0?
nM> plot/bg world
nM> feature label=v1 plot=plot table={NAME="V3",TYPE=SYMBOL|TEXT,
nM> set V1.x 36.0
nM> set V1.y 24.0
Nothing is wrong, this is the expected behavior.
The reason it shows up now and not in earlier versions of NeXtMidas is because an additional ENABLE flag (BSTORE) was implemented in the newer releases of NeXtMidas. The new flag is off by default, but when ENABLE=ALL is used it becomes enabled. If you had used ENABLE=DEF to enable only the default options, the behavior would match older versions of NeXtMidas (i.e. using ENABLE=DEF is backwards-compatible, ENABLE=ALL is not).
The BSTORE option (which is enabled in this case) tells PLOT to put the feature into the backing store. This increases the performance of PLOT by reducing the frequency of redraws for items in the backing store. Since the backing store is used for things that do not change or change infrequently, it is the user's responsibility to force the backing store to redraw when something changes in it (one way to do this is by calling the MPlot.resize() method).

Using Files (includes URLs)

When I download a file via HTTP I don't always get the entire file. The amount of the file that I get is unpredictable. I can load the file in a web browser, what's wrong?
The HTTP response can have the content-length specified. By default Java checks this (see and tries to download that number of bytes.
If the content-length is not specified it will try to download as much as it thinks it needs (which is usually not enough). If the content-length is incorrect, unpredictable behavior may be observed and it is possible that an exception may be thrown.
Unfortunately bad or missing content-length values are seen all-too-often on the web. As such, most web browsers try to take this into account (though at the expense of speed). (In the future we may proviode an option for this in NeXtMidas.)
The easiest fix (provided you are able to alter the server) is to provide accurate content-length values.
I created a file using NeXtMidas that X-Midas doesn't understand. For example, I get an "incorrect number of bytes read" error message when I try to datalist or xdatalist the file. Is this a bug?
This is an X-Midas bug present in older versions of X-Midas. A version of the bug is present in X-Midas up to version 4.5.4. Old versions of X-Midas try to read the file in exact 512-byte blocks. Newer versions can handle files that are not organized exactly into 512-byte blocks, but have problems with files that start out a non-integral multiple of 512-bytes, and then have data records removed from them. A quick workaround for this issue is to add a keyword to the offending file (see Keyword), which adds an extended header block to the end of the file thereby forcing it to a multiple of 512-bytes. The Midas Blue File specification (Midas BLUE File Format / Version 1.0.0 (CCD-2006002-1.0.0)) does not require files to be padded out to 512-byte multiples, thereby boosting performance and using less disk space.
I had a large file called myfile.prm and then used NOOP to copy a smaller file over top of it. When I do a ls in the Unix shell it says that myfile.prm is still big. What is wrong?
Nothing is wrong. It is standard parctice for Midas frameworks (X-Midas, NeXtMidas, and others) to write a new file over top of an older file with the same name. When it does this it does not delete the old file first, laeving the old space allocation (on disk) intact. This is done for historical reasons and because it improves disk-access time for some applications.
I have a file with a strange file name like data_2007:12:07::23:09:18.tmp, I can read it in X-Midas, but not in NeXtMidas, what is wrong?
The use of special characters in the file name is causing problems. In this case the colon is making it look like a URL with a protocol of data_2007:. You can work around this by prefixing it with a protocol identifier. For example, use file:data_2007:12:07::23:09:18.tmp when accessing the file.

NeXtMidas/X-Midas Compatibility

Can I use my X-Midas host primitives with NeXtMidas?
Yes! The XBC option tree for NeXtMidas lets you use most X-Midas primitives as-is (without modifying any Fortran code).
Can I use my X-Midas macros with NeXtMidas?
Not at this time.
Can I use my NeXtMidas macros with X-Midas?
Yes! Please see the NeXtMidas as an X-Midas Option Tree section in the NeXtMidas User's Guide for details.
Can I use my NeXtMidas primitives with X-Midas?
Yes! Please see the NeXtMidas as an X-Midas Option Tree section in the NeXtMidas User's Guide for details.
I am familiar with the X-Midas commands. How do I use them in NeXtMidas?
Look at the X-Midas To NeXtMidas Command Mapping section.
I know how to use NeXtMidas commands. How do I use them in X-Midas?
Go to the NeXtMidas To X-Midas Command Mapping section.
When I change directories in X-Midas, NeXtMidas doesn't seem to see to see the updates, as in this example:
X-Midas> nm/on/bg/id=999
X-Midas> nm res aux.0
  S: AUX.0  = /home/xmmgr/temp/
X-Midas> cd /my/data/
X-Midas> aux/list
  Path(0)   = /my/data/
  Path(98)  = /home/xmmgr/
  Path(99)  = /home/xmmgr/xm-4_4_4/xm/dat/
X-Midas> nm res aux.0
  S: AUX.0  = /home/xmmgr/temp/
Why is that?
When X-Midas launches a process in the background (such as NM), it uses the current working directory for that process. When the user does a cd to change the current working directory, that only affects new processes, it does not affect those processes already running. The easiest way arround this is to use an AUX other than AUX 0 (or CWD).

Using Applets/WebStart With NeXtMidas

When I run a NeXtMidas WebStart application, I get a "Security Warning" that says the application wants "access to your local machine and network." What should I do?
This is a normal security warning telling you that NeXtMidas will use the local system to store files, etc. When this warning message appears, just click "Start."
I installed the Java Development Kit on my Linux system, but Netscape doesn't recognize the plug-in. What's wrong?
Before Netscape, Mozilla, or Firefox can see the plug-in, most Unix systems require a symbolic link to be made so the browser can see the plug-in. The Browsers section explains how to do this.
Can I use native libraries (C/C++/Fortran) with Applets/WebStart?
No, only Java classes can be used.
Do different applications using same JAR file download the file again?
Each JAR is identified with its source URL and will be cached and shared. For more information see
My NeXtMidas application works fine form the OS shell or NeXtMidas shell, but why does it crash with an OutOfMemoryError when run from Java Web Start?
Try increasing your JVM's maximum (heap) memory size. The default maximum amount of memory in Java Web Start is 64 MiB. To increase the memory for the Java Web Start application, set the max-heap-size attribute of your j2se element under the resources element in your applications's JNLP file. You can also set the initial memory size (which defaults to 16 MiB) via the initial-heap-size attribute.
For example, to set initial memory to 128 MiB and maximum memory to 256 MiB:
 <j2se version="1.4.2+" initial-heap-size="128m" max-heap-size="256m"/>
 <jar href="nxm-sys.jar" main="true"/>
 <jar href="nxm-map.jar"/>
For more information see
Another JNLP tag reference

Using Apache With NeXtMidas

I setup Apache for NeXtMidas and when I access the NMROOT URL in my browser, I get this error: "You don't have permission to access /nmroot/ on this server." What is wrong?
Sounds like a permissions problem in one or more of the directories to get to NMROOT. Try setting each permission to be readable and executable by user/group/other.
Why do I get the error "The requested URL /nmroot was not found on this server" when I access NeXtMidas on an Apache server?
You probably forgot the slash (/) at the end of the URL (i.e., http://<myserver>/nmroot/).
I setup Apache for NeXtMidas and when I run the TEST_CGI macro in nxm.sys.test I get this error: "...Server returned HTTP response code: 500...." The ScriptAlias directive in my Apache configuration file is correctly pointing to nxm.sys.test error. What's wrong?
Most likely, Apache is unable to execute the CGI scripts used by the TEST_CGI macro. The CGI scripts must be executable. To fix this in a Unix shell, set the scripts used by TEST_CGI to be executable:
$ cd $NMROOT/nxm/sys/test
$ chmod a+x *.sh

Using NetBeans With NeXtMidas

After NetBeans completes "Scanning Project Classpaths" a red error message appears in the status bar. Why?
There are two possible causes:
  1. NetBeans does not support the use of "recursive links" (a link that points to a parent directory). For example, an option tree OPT with a nxm directory containing a link to opt (i.e. opt/nxm/opt -> opt) causes problems for NetBeans and results in an error message similar to: "nxm/opt/nxm/opt/nxm/opt/nxm/opt/nxm/opt". Any similar links need to be removed.
  2. Or, you do not have the proper permissions to read/write all of the files in (and below) the NeXtMidas directory. In Unix, try the following:
    $ cd $NMROOT
    $ chmod -R ug+rwx *
    If you continue to have problems, contact your system administrator.
When I open a frame I previously created in NetBeans, or create a new frame and add a MidasDisplay to it, a red error message appears in the NetBeans status bar. Why?
NetBeans is unable to read the JAR file the widgets are in. Here's the fix:
  1. Recompile NeXtMidas:
    $ nm make clean all
    $ nm make all all
  2. Re-register the NeXtMidas widgets in NetBeans (go to Registering the NeXtMidas Widgets).
If this fails, verify that you have the proper permissions for accessing the NeXtMidas files and the NeXtMidas JAR file.
I created a new GUI form in NetBeans (following the instructions in Using NetBeans with NeXtMidas ), but after clicking "Next" in the "New File" window NetBeans just sat there for several minutes. Why?
We have only reproduced this problem when running NetBeans from a network-mounted drive (i.e. NetBeans is not installed on the local system). The only suggestions we can offer are (1) wait or (2) try installing NetBeans on the local system.
Can I build NeXtMidas classes within NetBeans?
Building NeXtMidas requires several steps that NetBeans is unaware of. Files compiled within NetBeans may not work properly. (Hopefully, this will change in the future.)
Is an Ant build file available for NeXtMidas?
No, but this is on our "wish list" for a future release.
Can I add the NeXtMidas valuator widget to my palette in NetBeans?
This capability is currently being worked on and will be included in an upcoming release of NeXtMidas.
NetBeans says I should put my source files in a directory separate from my compiled class files. How do I do this?
This isn't necessary if you created your NeXtMidas project in NetBeans following the steps outlined in Starting a Project in NetBeans.
Can I use [Advanced NetBeans Feature] with NeXtMidas?
Possibly. NetBeans has many advanced features which we have not properly checked yet for compatibility with NeXtMidas. If you use [Advanced NetBeans Feature] with NeXtMidas, please provide us an outline of what was done and we will make it available for other users.


When I try to run my Primitive command, I get the following erorr (InvocationTargetException and NoClassDefFoundError):
nM> mycommand
Exception in thread "main" java.lang.reflect.InvocationTargetException
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Caused by: java.lang.NoClassDefFoundError: nxm/myopt/prim/mycommand (wrong name: nxm/testopt/prim/mycommand)
  at java.lang.ClassLoader.defineClass1(Native Method)
  at nxm.sys.lib.Shell.getCommandForClassName(
  at nxm.sys.lib.Shell.loadCommand(
The primitive is in the wrong package (it should be in "nxm.myopt.prim") (i.e. near the first line of make sure you have package nxm.myopt.prim; and NOT package nxm.testopt.prim;.
Or, you have defined the name of the option tree incorrectly. I.e. in this case the "MYOPT" option tree should be defined as "TESTOPT".