Here's the story:
I wrote a program yesterday and exported it to a jar file. I then tried to open it by double clicking it, and nothing happened. After a bit of research, I made sure that my jre was up to date (it is). I associated javaw.exe with jar files by right clicking the file and navigating to javaw.
The funny thing is that the file works in command prompt, meaning I can execute it there, but nothing happens on a double click on the desktop. So I thought it might be, because the program doesn't have a GUI or anything, meaning it has no pop up window. It's just text. So I wrote a tiny program that uses JOptionPane to display "Hello." That .jar also works if opened through the command prompt, but still doesn't open on a double click.
Does anyone know why?
If it helps, here's the second program code, which, as I mentioned, also doesn't work on a double click:
import javax.swing.*;
public class Hello {
public static void main(String[] args) {
JOptionPane.showMessageDialog(null, "Hello.");
}
}