mjbWorld - Troubleshooting

Are you getting the following error messages:

  1. 'out of environment space'
  2. Exception in thread "main" java.lang.NoClassDefFoundError: mjbWorld/mjbWorld
  3. OutOfMemoryError
  4. 'java' is not recognized as an internal or external command, operable program or batch file.
  5. ZipException
  6. Windows 95/98/ME issues
  7. Java Runtime Environment\CurrentVersion' has value '1.4', but '1.3' is required
  8. Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/Element
  9. mjbModel.readX3d org.xml.sax.SAXException: System property org.xml.sax.driver not specified

 

 


'out of environment space'

Is the 'out of environment space' message happening after the classpath like this:

C:\mjbWorld>SET CLASSPATH=;C:\mjbWorld\mjbWorld.jar
Out of environment space

If so, someone else had this problem, and they were running windows 9x, are you running windows 95 or 98 ?
If so I think windows 9x has limited space for classpaths.
A possible solution for this is to take out the classpath lines and put a -cp argument for the java command as follows:

SET PATH=%PATH%;C:\mjbWorld
SET
PATH=%PATH%;C:\jdk1.2.2\jre\bin;C:\jdk1.2.2\jre\lib;C:\jdk1.2.2\jre\lib\ext
CD C:\mjbWorld
java -cp C:\mjbWorld\mjbWorld.jar;C:\ProgramFiles\JavaSoft\jre\1.2\lib\rt.jar;C:\ProgramFiles\JavaSoft\jre\1.2\lib\ext\j3dcore.jar;C:\jdk1.2.2\jre\lib\ext\vecmath.jar;C:\jdk1.2.2\jre\lib\ext\j3dutils.jar;C:\mjbWorld\bsh0_96.jar
mjbWorld.mjbWorld

Note: in above script C:\mjbWorld\mjbWorld.jar;C:\Pr... is on the same line as java -cp, ie

java -cp C:\mjbWorld\mjbWorld.jar;C:\Pro...

when this is displayed in html it puts it on a separate line

 


Exception in thread "main" java.lang.NoClassDefFoundError: mjbWorld/mjbWorld

Tthe java command does not seem to be able to find mjbWorld.jar in C:\mjbWorld or the directory that you are using to store it.Check the location of mjbWorld.jar and can that directory be seen, ie CD C:\mjbWorld


java.lang.OutOfMemoryError.

I think the problem is likely to be due to the amount of memory allocated to the Java VM, see the following quote from the Java3D FAQ

Out of memory problems
If you get an error message about your Java 3D program (or any Java program for that matter). The Java virtual machine allocates a certain amount of memory to use, and it's much less than people typically have on their systems. To increase this limit, use the -Xmx option when you run the program. For example, the command:

java -Xmx64m program

will allocate 64 meg of memory space

I suggest you try various memory sizes.


'java' is not recognized as an internal or external command, operable program or batch file.

The operating system cannot find the Java runtime. You need to have the path set to point to the directory where java is installed.

SET PATH=C:\jdk4.1.3\bin


ZipException

Exception in thread "main" java.util.zip.ZipException: The system cannot find the file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)

Although I have not been able to reproduce this myself, the following people have kindly sent me an explanation:

Correspondance about this error:


Java Runtime Environment\CurrentVersion' has value '1.4', but '1.3' is required

C:\mjbWorld>java mjbWorld.mjbWorld
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion' has value '1.4', but '1.3' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.

This seems to happen when you have a version of Java installed on your machine, then you install Jbuilder with a different version. I have checked the value is 1.4 in the registary as shown here,


so why does the program want to use version 1.3? I don't know can anyone help?

see stefanh


Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/Element

C:\mjbWorld>java mjbWorld.mjbWorld
Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/dom/Element
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at mjbWorld.mjbWorld.<init>(mjbWorld.java:31)
at mjbWorld.mjbWorld.main(mjbWorld.java:50)

From 5.14 of mjbWorld it requires version 1.4 or greater of Java to run on. If you are getting this error then you need to upgrade to JDK1.4.

If it is not possible to upgrade to Java 1.4 then you should use version 5.13 of mjbWorld.


mjbModel.readX3d org.xml.sax.SAXException: System property org.xml.sax.driver not specified

mjbWorld.mjbWorld -Dorg.apache.crimson.parser.XMLReaderImpl
mjbModel.readX3d org.xml.sax.SAXException: System property org.xml.sax.driver not specified


Windows 95/98/ME issues

You may have to change all references to "Program Files" to "PROGRA~1" to avoid "bad command or file name" messages from DOS.


metadata block
see also:

 

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

 

cover Beginning Java 2 SDK 1.4 Edition - A good book for learning java

 

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to this site, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

cover JBuilder - There is also a free version of Jbuilder at borland website . However its licence conditions are quite restrictive so you may prefer another java IDE.

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2017 Martin John Baker - All rights reserved - privacy policy.