bootpcommand.java
来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 40 行
JAVA
40 行
/*
* $Id: BootpCommand.java,v 1.1 2003/11/25 11:52:27 epr Exp $
*/
package org.jnode.net.command;
import org.jnode.driver.Device;
import org.jnode.net.ipv4.bootp.BOOTPClient;
import org.jnode.shell.help.DeviceArgument;
import org.jnode.shell.help.Help;
import org.jnode.shell.help.Parameter;
import org.jnode.shell.help.ParsedArguments;
/**
* @author epr
*/
public class BootpCommand {
static final DeviceArgument ARG_DEVICE = new DeviceArgument("device", "the device to boot from");
public static Help.Info HELP_INFO = new Help.Info(
"bootp",
"Try to configure the given device using BOOTP",
new Parameter[]{
new Parameter(ARG_DEVICE, Parameter.MANDATORY)
}
);
public static void main(String[] args)
throws Exception {
ParsedArguments cmdLine = HELP_INFO.parse(args);
Device dev = ARG_DEVICE.getDevice(cmdLine);
System.out.println("Trying to configure " + dev.getId() + "...");
final BOOTPClient client = new BOOTPClient();
client.configureDevice(dev);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?