Hello,
I just started learning Java and I'm having trouble executing a simple "hello" command. I don't think the error is code related. After creating a simple "Hello World" .java file and compiling it into a .class file I am getting this error when attempting to run the program in the command prompt (using "java MyProgram"):
Error Occured during initialization of VM
Java.nio.charset.UnsopportedCharsetException
This is accompanied by a "Java Platform SE Binary has stopped working" message.
Here is the code:
I have checked to make sure I am in the right directory in the command prompt, made sure the class file compiled, and I've done some Google searches to figure out the issue but nothing has come from it. I'm slightly discouraged since I'm not very far into my book and I already need to seek help.
Thanks in advance though! Let me know if you need more information.
I just started learning Java and I'm having trouble executing a simple "hello" command. I don't think the error is code related. After creating a simple "Hello World" .java file and compiling it into a .class file I am getting this error when attempting to run the program in the command prompt (using "java MyProgram"):
Error Occured during initialization of VM
Java.nio.charset.UnsopportedCharsetException
This is accompanied by a "Java Platform SE Binary has stopped working" message.
Here is the code:
public class MyProgram { public static void main(String[] args) { System.out.println("Hello World!"); } }
I have checked to make sure I am in the right directory in the command prompt, made sure the class file compiled, and I've done some Google searches to figure out the issue but nothing has come from it. I'm slightly discouraged since I'm not very far into my book and I already need to seek help.
Thanks in advance though! Let me know if you need more information.