About 9,360,000 results
Open links in new tab
  1. How do I run a Java program from the command line on Windows?

    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; import …

  2. How does Java run() method work? - Stack Overflow

    May 26, 2012 · Multi-threading in Java is done by defining run() and invoking start(). Start delegates to a native method that launches a thread through operating system routines and run() is invoked from …

  3. java - Run a JAR file from the command line and specify classpath ...

    When you specify -jar then the -cp parameter will be ignored. From the documentation: When you use this option, the JAR file is the source of all user classes, and other user class path settings are …

  4. java - How to run a JAR file - Stack Overflow

    Dec 4, 2016 · 11 If you don`t want to create a manifest just to run the jar file, you can reference the main-class directly from the command line when you run the jar file.

  5. How to run Java program in command prompt - Stack Overflow

    Aug 15, 2012 · I created a Java project to call a Web service. It has one Main java file and another class file. I have used some jar files for HTTP client. In Eclipse it runs fine. I need to run the Java program...

  6. java - What's the difference between Thread start () and Runnable run ...

    Dec 21, 2011 · Another difference between start() and run() in Java thread is that you cannot call start() twice. Once started, second start() call will throw IllegalStateException in Java while you can call …

  7. java - Run jar file in command prompt - Stack Overflow

    May 23, 2017 · Run jar file in command prompt [duplicate] Asked 14 years, 8 months ago Modified 5 years, 10 months ago Viewed 1.0m times

  8. java - Run class in Jar file - Stack Overflow

    Mar 19, 2023 · There are two types of JAR files available in Java: Runnable/Executable jar file which contains manifest file. To run a Runnable jar you can use java -jar fileName.jar or java -jar -classpath …

  9. How to force garbage collection in Java? - Stack Overflow

    Sep 26, 2009 · Is it possible to force garbage collection in Java, even if it is tricky to do? I know about System.gc(); and Runtime.gc(); but they only suggest to do GC. How can I force GC?

  10. java - How to run JUnit test cases from the command line - Stack …

    Feb 10, 2010 · I would like to run JUnit test cases from the command line. How can I do this?