Tech Support Guy banner
Status
Not open for further replies.
1 - 3 of 3 Posts

·
Registered
Joined
·
2 Posts
Discussion Starter · #1 ·
I am enrolled in a beginning Java class and have to use JOptionPane for some of my assignments. I am able to compile the program but when I try to run it i get an error message saying "Windows cannot open the program" and it tells me to select a program to use to open the file. I tried one of the examples from my book and got the same thing. Do I need something other than JDK? I have version 6 with update 16.

Here is the example:

import javax.swing.JOptionPane;

public class Dialog1
{
public static void main (String args[])
{
JOptionPane.showMessageDialog(null, "Welcome\nto\nJava");
}
}
 

·
Registered
Joined
·
4,810 Posts
You can also add the directory to your PATH environment variable
 
1 - 3 of 3 Posts
Status
Not open for further replies.
Top