Depends on the directory itself.
By default, Java will not install to C:\Java, and if it was not installed there (and a good indicator that java.exe or javac.exe are not available in ./bin there, or check the system path to see if its registered), then you would be fine to delete it.
java.exe will by default install on windows to C:\Program Files\Java\jre#\bin, where # is the version number of java. You definitely don't want to delete this, which is why you need to check if it was installed to C:\JAVA\jre#\bin, which would make that the valid installation path.
header('HTTP/1.1 420 Enhance Your Calm');