⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dhcpcommand.java

📁 纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统
💻 JAVA
字号:
/*
 * $Id: DhcpCommand.java,v 1.1 2004/02/17 20:51:12 markhale Exp $
 */
package org.jnode.net.command;

import org.jnode.driver.Device;
import org.jnode.net.ipv4.dhcp.DHCPClient;
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 markhale
 */
public class DhcpCommand {

        static final DeviceArgument ARG_DEVICE = new DeviceArgument("device", "the device to boot from");

	public static Help.Info HELP_INFO = new Help.Info(
		"dhcp",
		"Try to configure the given device using DHCP",
		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 DHCPClient client = new DHCPClient();
		client.configureDevice(dev);
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -