Running .java-files won't work/compile does!(Code inside)
Hey there and sorry for the strange Topicname but i could not found any short description for my problem since i don't even know what kind of problem it is!
I have downloaded the jdk6.12 from the sun homepage, installed it and set the path (i hope i did that correctly,using windows xp).
To check out if everything is working correctly i tried to write a small Programm and run it and there lies the problem. Compiling any code will work without mistakes but i cannot run the code, it always gives me this message and i dont know what it does mean:
jdk is installed to c:\programm files\java\jdk...
Exception in thread "main" java.lang.NoClassDefFoundError: ShortBsp
Caused by: java.lang.ClassNotFoundException: ShortBsp.java
at java.security.AccessController.doPrivileged(Native Metho
Could not find the main class: ShortBsp.java. Program will exit.
Java-Files are at D:\Java
My steps to create a programm:
open notepad, type the code and store it in the folder.
cmd -> CD D:\Java
It would be really cool if somebody could tell me how to solve this problem! So far i have found a lot of threads of people who had a similar problem but i have yet not found a solution!
Running a Java program...
- To compile: javac ShortBsp.java
- To run: java ShortBsp (don't add the .java extention)