Tag: 重启

Java帮助重启程序

import java.util.Scanner ; public class Mal { public static void main (String []args) { System.out.println(“Welcome”) ; Scanner myinput=new Scanner (System.in) ; System.out.println(“Make your choice. \n 1.Check a card number \n 2.Quit.”); int choise=myinput.nextInt(); switch(choise) { case 1:System.out.println(“Enter your credit card number: “); break; case 2:System.out.println(“Are you sure?”) ; String answer=myinput.next(); if(answer.equals(“yes”)){ System.out.println(“Byee :)”) ; System.exit(0); […]

如何重启java应用程序,记住它的命令行参数

我有一个java应用程序。 它可以通过几个命令行标志启动。 我想提供能力“重启”用户的应用程序。 目前,我们将参数保存在控制文件中,在重新启动应用程序时读取它。 重启应用程序的最佳方法是什么 – 如何保留命令行参数?