Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
How to run a program that i created on windows 7?
I created a program called Exercise12_5 and I went into command prompt to run it but it says javac is not recognized
When i run it in school it runs fine, with no problem
CAN SOMEONE JUST HELP ME FIGURE OUT HOW TO RUN IT ON MY COMPUTER???
2 Answers
- Anonymous10 years agoFavorite Answer
You probably do not have the java compilter in your path environment setting. Java is usually installed in: C:\Program Files (x86)\Java\jre6\bin. Could be a little different based on your version installation.
Go to that directory to have access to javac. If you can, add the directory to your path by right clicking on computer in the start menu, properties, click environment variables, and edit the PATH system variable by adding the path to where javac resides.
- 10 years ago
If it has already been compiled into a .class file, then there is no need to use javac.
Instead, navigate in Command Prompt to the location of said class file and type in:
java ex12_5
where ex12_5 is the name of the main class (I'm assuming you have a main method in that class). Also at the end of that, including any arguments read into the program.
Say, for instance you read in two Strings, then it would be:
java ex12_5 string1 string2