Java console program

前端 未结 6 1841
花落未央
花落未央 2021-02-01 15:30

I was wondering how to make a Java console program. I use Eclipse as IDE. Looking for something similar to C#\'s version of a console program.

Tried Google but only foun

6条回答
  •  独厮守ぢ
    2021-02-01 16:26

    there is nothing special that makes it console, just use the standard output and standard input, no swing or awt and that's it.

    once you have the jar file just issue

    java -jar file.jar
    

    or if you don't have jars just

    java package.name.ClassName
    

    withouth the trailing.class

提交回复
热议问题