Frequently Asked Questions

 

  1. I'm getting a java.lang.NoClassDefFoundError / Could not find the main class.
  2. I'm running Linux and have managed to fix the NoClassDefFound error, but now the Structure Planner tells me that Java 3D isn't installed.
  3. I want to create huge structures, but I'm running out of memory.
  4. How do I run this application from the command line?
  5. I keep getting a dialog box saying that Java 3D isn't installed, but I've installed it?
  6. I'm running Java 7, but the Structure Planner doesn't seem to draw the screen properly?

 

 


 

Q. I'm getting a java.lang.NoClassDefFoundError / Could not find the main class.

A:  My spidey sense is tingling, and is telling me that you're running a 64-bit JRE or JVM.  This is almost certainly resulting in the following exception:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/j3d/GraphicsConfigTemplate3D Caused by: java.lang.ClassNotFoundException: javax.media.j3d.GraphicsConfigTemplate3D at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: minecraft.planner.gui.StructurePlanner. Program will exit.

This problem is caused by the fact that the 64-bit installer for Java 3D is horribly unreliable.  What's happened is that the installer has failed to put the JAR files and library files in the correct sub directories.  There are two ways that you can fix this:

1. The Easy Way
Uninstall everything Java related: all JRE's, JVM's and Java 3D installations.  Follow the install directions for the 32-bit version of Java and Java 3D given on the download/installation page.

2. The Not So Easy, but Far Cooler Way
It's possible to get Java 3D correctly installed under 64-bit Java, but you're going to have to do some sleuthing, and some file copying:

i. Find the location of the Java JVM that's being used to run your Java applications.
ii. Ensure that the 64-bit Java 3D JAR files are copied into the /lib/ext directory within the JRE or JDK you installed. The required JAR files are j3dcore.jar, j3dutils.jar, and vecmath.jar.
iii. Ensure that the 64-bit Java 3D dll files are copied into the /bin directory within the JRE or JDK you installed. The required DLL files (in the case of Windows) are j3dcore-d3d.dll, j3dcore-ogl.dll, j3dcore-ogl-cg.dll and j3dcore-ogl-chk.dll.  Unix/Mac OS will have their own similarly named library files that need to be copied into the bin directory.

 


 

Q.  I'm running Linux and have managed to fix the NoClassDefFound error, but now the Structure Planner tells me that Java 3D isn't installed.

A:  There is some extra "Java 3D Fu" that needs to be performed to get Java 3D working correctly under Linux.  This thread covers what needs to be done.

 


 

Q.  I want to create huge structures, but I'm running out of memory.

There are two things you can do here:

1. The biggest usage of memory within the Structure Planner is the 3D display.  If you can live without that then you can turn off 3D with the following command line:

java -cp <minecraftstructureplanner.jar path> -Ddisable3D=true minecraft.planner.gui.StructurePlanner

2. You can run the Structure Planner with more memory.  Note that if you're running 32-bit Java, the most memory you'll be able to allocate to the Structure Planner is 1536MB.  You can allocate extra memory by running with the following command line:

java -cp <minecraftstructureplanner.jar path> -Xmx<heap size>M minecraft.planner.gui.StructurePlanner

 


 

 

Q.  How do I run this application from the command line?

To run the Structure Planner from the command line, use the following (obviously replacing the text in angle brackets with the appropriate values for your system):

java -cp <minecraftstructureplanner.jar path> -Xmx<heap size>M minecraft.planner.gui.StructurePlanner

 


 


Q.  I keep getting a dialog saying that Java 3D is not installed?

I'm going to assume that you've run the Java 3D installer and that you're still getting this error.  The dialog box is in fact a simpler and friendlier version of the error detailed in this FAQ entry.  Follow the steps for correcting the Java 3D installation and you should be fine.

 

 


 

 

Q.  I'm running Java 7, but the Structure Planner doesn't seem to draw the screen properly?

Java 7 is not yet officially released, and as such it still has some issues.  Currently there are problems with retrieving font metrics, which in turn cause the Structure Planner not to be able to draw its display correctly.  I suggest using an official JRE or JDK such as the latest 1.6 release.