简体   繁体   中英

Break JAVA program from the Windows command prompt

I am running Windows 7. Is there any way to break a program running from the command prompt?

For example, I run a Java program that has multiple threads. In one of the threads, there is an exception, but the program continues to run.

I want to use the Ctrl + Break command that I use for other programs, but for some reason this will not work. Any shortcuts to stop the program from the console?

使用CTRL + C中断程序。

the first thing to do, you will have to write the code that you want to run and save that as a java executable file.

you should also make sure of proper intentions since as 'java' file and as a '.txt' file. In other to do so, check here>> https://www.thewindowsclub.com/how-to-run-a-java-program-from-the-command-prompt

now open the command prompt and run as administrator. make use of the 'cd' command to change the operating directory on the command prompt to the one you wat your java program is restored.

run the following command line:

cd Folder-destination [Java-program-flder] 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM