Read the whole thing before replying I have no idea how this works, but hey it's a place to ask questions. I'm trying to learn how to code in Java, and I've literally gotten nowhere because I can't compile a file, because when I try to, it says something along the lines of "javac is not an internal or external command". Yes, I've tried to set the variables to the bin folder in program files, multiple times. I do have a lead; it could be something to do with everyone's java folder being in program files, while mine is in program files x86. Please respond.
Asked
Active
Viewed 52 times
-1
-
If there is no java on your computer, you'll need to go to openjdk.net and download the SDK (System Developer's Kit) of your choice. It should install just like any other Windows package. If you need the Linux version, there may be a version in your repositipory. – NomadMaker Feb 26 '20 at 00:57
-
ok so I got another lead (I downloaded JDK and it still didn't work btw), I put in this command: `SET CLASSPATH "E:\Java\bin";` and it said "Environment variable CLASSPATH (etc.) not defined". No clue what this means, I'm entirely new to this so yeah. – anonymous Feb 26 '20 at 02:43
-
Well none of this made since, so I looked up a tutorial on youtube, and I got it now thanks – anonymous Feb 26 '20 at 22:32
1 Answers
0
Open the jdk directory at the command prompt and then run the javac command. Using windows and jdk1.8.0_231 it would look like this:
cd C: \ Program Files \ Java \ jdk1.8.0_231 \ bin
So:
javac

Joao Marcos
- 1
- 1