I had the same problem, and then found out that JDeveloper creates files
specific to the JDeveloper Application when a program is compiled. Because of
this difference I believe you cannot directly run a program in JDK that was
created in JDeveloper.
You will need to paste the code into another file and compile it in the JDK
environment to make it work there.