Question

My client appears to have Java Runtime Environment loaded on her computer (both x86 and 64 bit versions), but desktop Java programs won't run.

I wrote a simple program to test the Java version and make sure it was functioning properly, but even this little program won't run. (It runs fine on my computers.)

import javax.swing.JOptionPane;
import com.sun.servicetag.SystemEnvironment;

public class VersionTesterWithBits
{
    public VersionTesterWithBits()
    {
    }

    public static void main(String args[])
    {
        JOptionPane.showMessageDialog(null, "Java Version = " + System.getProperty("java.version") 
        + "\nBits = " + System.getProperty("sun.arch.data.model"), "Test", 1);
        System.exit(0);
    }
}

I also tried running it using a batch file (similar to below) with each Java file (x86 and 64-bit) to see if one of them was the problem. Neither worked.

SET PATH=C:\Program Files (x86)\Java\jre7\bin
java -jar VersionTesterWithBits.jar

I also tried running java -version from the command prompt and nothing came up. (i.e. "java is not recognized as an internal or external command, operable program or batch file")

They're supposedly running Java 7 Version 40. It looks like the desktop version, but is it possible this is a web-version? (Or would that be in a browser directory?)

Any thoughts on what the issue could be?

Was it helpful?

Solution

Check the PATH, and make sure that java's bin folder is on it. Sometimes when you do an update of Java, it doesn't update the path.

Edit- I see that you're setting the path variable, but make sure that actually worked. Is that actually where Java is located? Shouldn't that be in quotation marks because of the spaces?

OTHER TIPS

Apparently the problem was unrelated to Java. There was an issue with her Windows profile.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top