Q: Javac works java does not I am stuck. I have netbeans working but when I do command line stuff javac works but java does not.
I get this at the command line

Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

in PATH i have

C:\Program Files (x86)\Common Files\Oracle\Java\javapath
C:\Program Files\Java\jdk
C:\Program Files\Java\jre

Java_Home is

C:\Program Files\Java\jdk

I dont know what to do at this point.
my batch file runs on my other computer with java but not this one
SET CLASSPATH = .;
javac *.java
java Main
pause
del *.class


A: I guess this is common problem when beginning to use java.
From the above comments it seems maybe you have not set the class path correctly after installing the jdk. 

Here are the steps to do it:
1. in run dialog box, type sysdm.cpl
2. go to system properties->advanced->environment variables
3. click new button under system variables window
4. In the new System Variable window, set the Variable name to JAVA_HOME and the Variable value to the path to your JDK directory (so this would be C:\Program Files\Java\jdk in the system of the questioner. then click ok.
4. Find the variable called Path under system variables and click edit
5. Then click NEW in the edit environment
6. Name the new variable %JAVA_HOME%\bin 
7. click and enter and ok.


resources consulted: https://appuals.com/fix-javac-is-not-recognized-on-windows-10/
