Solved: JOptionPane

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

mskeys2xx3

Thread Starter
Joined
Sep 7, 2009
Messages
2
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");
}
}
 

NeonFx

Malware Specialist
Joined
Oct 22, 2008
Messages
4,811
You can also add the directory to your PATH environment variable
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top