I want to run my program (java) on cmd, but an error occurred.
Go to solution
Solved by AnirbanG007,
7 minutes ago, REDRIDINGHOODS said:
The java runtime that I downloaded is version Java SE Development Kit 15.0.2 (which is the recent one on java's website) and, it runs perfectly on notepad++. But the problem is why I can't execute my program on cmd.
IIRC, you need to install the JDK on some partition other than the C drive to compile and run programs from CMD. I ran into the same issue when I was in school. BlueJ would compile my programs fine, but CMD wouldn't. Installing the JDK in a partition other than C, helped me, and I could compile Java from CMD. I think it has something to do with access permissions from C drive or Program Files, not sure. Can you try this out?
PS: This was a long time ago, in 9th grade.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now