易截截图软件、单文件、免安装、纯绿色、仅160KB

JAVA得到网卡物理地址(windows和Linux)

在我们在写程序的过程中,有些时候需要知道一些电脑的硬件信息,比如我们写一些需要注册的程序的时候,就需要得到某个电脑特定的信息,一般来说,网卡的物理地址是不会重复的,我们正好可以用它来做为我们识别一台电脑的标志.那如何得到网卡的物理地址呢?我们可以借助于ProcessBuilder这个类,这个类是JDK1.5新加的,以前也可以用Runtime.exce这个类.在此我们将演示一下如何在Windows和Linux环境下得到网卡的物理地址.
代码如下:
/*
 * Test.java
 *
 * Created on 2007-9-27, 9:11:15
 *
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test2;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author hadeslee
 */
public class Test {
    public static String getMACAddress() {
        String address = "";
        String os = System.getProperty("os.name");
        System.out.println(os);
        if (os != null) {
            if (os.startsWith("Windows")) {
                try {
                    ProcessBuilder pb = new ProcessBuilder("ipconfig", "/all");
                  &nbs


相关文档:

linux系统目录架构

   根目录
/bin    常用的命令 binary file 的目錄
/boot   存放系统启动时必须读取的档案,包括核心 (kernel) 在内
     /boot/grub/menu.lst   GRUB设置
     /boot/vmlinuz   内核
     ......

***********Linux学习笔记汇总***********

linux目录架构
/       根目录
/bin         常用的命令   binary   file   的目錄
/boot       存放系统启动时必须读取的档案,包括核心   (kernel)   在内
          /boot/grub/menu.lst   &n ......

linux 0.11 内核学习 console.c,控制台


参考《linux内核完全注释》和网上相关文章
/*
 * 控制台显示操作
 */
/*
 *  linux/kernel/console.c
 *
 *  (C) 1991  Linus Torvalds
 */
/*
 * console.c
 *
 * This module implements the console io functions
 * 'void con_init(v ......

【转】linux mail利用外部邮箱地址发邮件

bin/mail会默认使用本地sendmail发送邮件,这样要求本地的机器必须安装和启动Sendmail服务,配置非常麻烦,而且会带来不必要的资源占用。而通过修改配置文件可以使用外部SMTP服务器,可以达到不使用sendmail而用外部的smtp服务器发送邮件的目的:
修改
/etc/mail.rc
set from=fromUser@domain.com

smtp=smtp.domain. ......

Linux环境的AMP安装 MSSQL扩展安装


Linux要安装mssql扩展,必须首先安装freetds,安装过程如下:
1、假设源文件目录为/webServ,安装目录为/opt/freetds。
1) >cd /webServ
2) 下载, >wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
3) 解压, >tar -zxvf freetds-stable.tgz
4) 进入, >cd freetds-0。 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号