2-9 of 55,000,000 results
Open links in new tab
  1. How do I run a Java program from the command line on …

    Apr 22, 2013 · I'm trying to execute a Java program from the command line in Windows. Here is my code: import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; …

  2. javac command examples

    Aug 4, 2019 · In this Java tools tutorial, you will learn how to use the Java compiler via the javac command to compile Java source files (.java) into bytecode files (.class).

  3. How to Run a Java Program from the Command Prompt

    Jul 16, 2025 · If you have a Java application and are wondering how you can run it, here's how to compile and run Java from the command prompt in Windows.

  4. How to compile a java project with a terminal/cmd - Stack ...

    Apr 23, 2016 · The javac command is not that friendly as you think it is. You have to let it know where to find the java file you want to compile. For example you saved Main.java inside …

  5. How to compile, package and run a Java program using command

    Sep 26, 2019 · This tutorial helps you use the core tools in JDK (javac, jar and java) to compile, package and run a Java program under the following circumstance: - The Java source file is …

  6. How to Run Java Program? - GeeksforGeeks

    Jul 23, 2025 · Step 2: Write your Java code in a text editor such as Notepad or any other code editor. Save the file with a .java extension and file type as 'All files' in the desired location. Step …

  7. How to Execute and Run Java Code from the Terminal

    Mar 10, 2022 · For compiling this type of Java code with the packages, we use the command javac -d . file_name_with_the_extension. As for now, I am using the Main.java file, so I will …

  8. Using Java from the Command Prompt in Windows

    You will use the Java compiler javac to compile a Java program and the Java interpreter java to execute it.