Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

how to run java game in terminal?

I have a text based java game, its only a single class. How do i run it in terminal, instead of on eclipse (the program im using)

2 Answers

Relevance
  • 8 years ago
    Favorite Answer

    I assume that in the system environment variables you have declared the path to the bin folder of your JDK.

    in the command console windows you just write:

    java name_of_the_game.class

    need to be in the folder where the file is, otherwise you should write java and the absolute path to the file

    Hope this help greattings From Uruguay!!!

  • lefler
    Lv 4
    4 years ago

    i do no longer understand something approximately macs, so i can not supply help to with that. although, a record named activity.java is the source code record for the java software, no longer the compiled executable record, which could be named activity.class. you may no longer run a java software until it relatively is been compiled.

Still have questions? Get your answers by asking now.