How to run a NetBeans project in command prompt?

后端 未结 8 993
挽巷
挽巷 2020-12-14 19:51

My professor asked us to create a Java program that would be able to run in command prompt but could also be opened using NetBeans.

The program is about using the di

8条回答
  •  盖世英雄少女心
    2020-12-14 20:45

    You will have a build directory inside your project. Navigate to it. Next open the classes folder.
    Now here open the terminal and run java x/y
    where x is the name of the package your main class is in and y is the name of that java file

提交回复
热议问题