Category: Java

The Processing Instruction Target Matching “[xX][mM][lL]” is Not Allowed

When running Java or other types of applications which use an XML file as part of the input, you may see this error: The Processing Instruction Target Matching “[xX][mM][lL]” is Not Allowed.

Often the cause is a malformed XML file, with a common problem being a blank line accidentally inserted before the required first line of the xml:

[ A blank line here will cause the error ]
<?xml version-"1.0"?>
Continue reading

Fixing the error: JAVA_HOME is not set on a Mac

While setting up Nutch on a Mac, I kept getting this error in the terminal:

Error: JAVA_HOME is not set

To fix the error on OS X 10.6.x (Snow Leopard), enter the following at the command prompt:

export JAVA_HOME=$(/usr/libexec/java_home)

On 10.5 and above, the command line tool /usr/libexec/java_home dynamically finds the top Java version specified in Java Preferences for the current user. Using this method will allow the path to automatically change as software updates change Java versions.

Continue reading
firefox logo

When Firefox won’t launch Java applets

If Firefox won’t launch java applets, but Internet Explorer will, you may need to change some settings in the Java control panel to turn on Applet support for Firefox. (Expert users: One sign that this is the issue rather than some Java security exception is that the Java console will be completely blank when you try to launch the applet in Firefox. _

Unfortunately on many PC’s, the Java control panel can be a challenge to find. First, check in the control panels area for “Java.” If it is not there, you may have to look in

C:Program FilesJava

for JRE (Java Runtime Environment) folders.

In the image below there are several of them. Usually you should pick the most recent one, as that is the one that is probably in use.

javacontrolpanel.jpg

Continue reading

Java error message: Several Java Virtual Machines running in the same process

When attempting to launch browser-based SCORM courseware, people have been getting the error: “Several Java Virtual Machines running in the same process caused an error”

Apparently many people have this issue since upgrading java. I came across it because it can affect the delivery of elearning courses if the learning management system relies on a java-applet based scorm adaptor to communicate.

Continue reading