Menu

How to run application through command line?

lilzz
2015-08-23
2015-08-25
  • lilzz

    lilzz - 2015-08-23

    RIght now, I import the whole project into eclipse and then run each application from eclipse. However, some application needs to run though command line with arguments. How do I do that.

    For example, I try run Hello world example on command line.
    I go inside the folder that contains the HelloWorld.java and HelloWorld.Class.

    I did java HellowWorld.Class

    It generates an Error: Could not find or load main class HellowWorld.

     
  • Travis Haroldsen

    The programs can all be run through eclipse. The command line arguments can be provided in the arguments tab under Run->Run Configurations.

     
    • lilzz

      lilzz - 2015-08-24

      I mean running those examples outside of eclipse.

      Can I make it a standalone application for each example?

      or running on Window dos prompt.

       

      Last edit: lilzz 2015-08-24
  • Chris Lavin

    Chris Lavin - 2015-08-25

    To run a Java program from the command line, you must run the JVM (java) and then provide the full class name if you aren't in the current directory of the Java class file. Typically you want to make sure the /bin directory from the JDK/JRE is on your PATH and that you have the RapidSmith project on your CLASSPATH.

     

Log in to post a comment.