What Kind of Reality Check Do I Need Quiz
Q&A for How to Compile & Run Java Program Using Command Prompt
Coming soon
Search
-
QuestionWhat would I do if I type in the Java filename.java and it is not running? The code written in Notepad is correct.Community AnswerIt is okay. You have to write for compiling : javac filename.java and for running: just filename.
-
QuestionHow can I compile using CMD?Community AnswerOnce you are in the correct directory, you can compile the program by typing "javac filename.java" into the command line and pressing enter.
-
QuestionHow can I hack a computer using the command prompt?Community AnswerYou can't without installing other things. CMD is NOT for hacking and should never be used for it.
-
QuestionWhat if when I type the direction of my file, for example "C:\Users\javaproject," the CMD replied this to me :(C:\Users\javaproject is not recognized as an internal command operable program or batch file)?Community AnswerAfter you defined the directory, you have to do the following: 1) Copy : C:\Program Files\Java\jdkvesion\bin 2) Specify the jdk version 3) Copy the path then you have to write inside cmd set path="C:\Program Files\Java\jdk1.8.0_91\bin"
-
QuestionHow do I compile my Java program if the command javac is not being recognized in the command prompt? What should I do?Living ConcreteTop AnswererThis means that you either do not have JDK installed or you do not have the javac binary added to your PATH environment variable. Try reinstalling the JDK or looking up how to add javac to your PATH environment variable for your operating system.
-
QuestionWhat does it mean when the command prompt says "javac"?Community Answer"javac" is short for Java Compiler. It's the service that compiles your Java into more computer readable code.
-
QuestionWhat can I do if filename.java is not working?Community AnswerMake sure that you are replacing "filename" with the actual name of your .java file. If it is still not working, there was an error in your code, check your syntax and try again.
-
QuestionWhen I execute the java file after compiling, I see a message that says, "Error: couldn't find or load main class test.java." How do I fix it?Isaac keelingCommunity AnswerI would guess you have been trying to run with "java test.java," whereas you should actually use "java test." This is for two reasons: firstly, test.java would refer to the java source file when you need the (compiled) class itself; secondly, the "java" command only wants the class name, not the file name.
-
QuestionHow do I run a java program when the command prompt shows that the saved file is not found?Community AnswerEither you don't have java jdk on your system or the file does not exist.
-
QuestionWhat command will be given at the command prompt instead of "CD desktop" if I had saved my Java programs in a folder not present on the desktop?Community AnswerThis depends entirely upon where you saved your Java programs. Assume you saved the Java programs in C:\temp\Java (replace with whatever directory you saved your files to); you'd enter the command CD C:\temp\Java and then use DIR to list contents of the folder. If any component of the folder path has one or more non alpha-numeric characters (i.e. space), you must use a double quote to begin the path name, i.e. CD "C:\temp\Java Programs".
-
QuestionHow to delete Java?iMetroLiveCommunity AnswerClick Start, point to Settings, and then click the Control Panel. In the Control Panel, double-click the Add/Remove Programs. On the Install/Uninstall tab, click the Java version you want to uninstall, and then click Add/Remove. When you are prompted to continue with the Uninstall, click Yes.
-
QuestionWhat do I do if my Java program made in Notepad isn't executing?iMetroLiveCommunity AnswerOpen the notepad and write a Java program into it. Save the Java program by using the class name followed by . java extension. Open the CMD, type the commands and run the Java program.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit