JavaÅжÏOSÊÇlinux»¹ÊÇwindows
public class Test {
public static void main(String aa[]) {
if (System.getProperty("os.name").equals("Linux")) {
System.out.println("linux");
} else if (System.getProperty("os.name").equals("Windows XP")) {
System.out.println("windows");
}
}
}
ʹÓõÄÊÇÒÔÇ°Ìáµ½¹ýµÄSystem.getProperty().º¯Êý
Ïà¹ØÎĵµ£º
#
# Õâ¶Î´úÂë±»Á¬½Óµ½systemÄ£¿éµÄ×îÇ°Ã棬ÕâÒ²ÊÇËüΪʲô³Æ֮Ϊhead.sµÄÔÒò¡£
# ´ÓÕâÀ↑ʼÄÚºËÍêÈ«ÔËÐÐÔÚ±£»¤Ä£Ê½Ï¡£head.s²ÉÓõÄÊÇat&t¸ñʽµÄ
# »ã±à¡£×¢ÒâµÄÊÇ´úÂëÖеĸ³Öµ·½ÏòÊÇ´Ó×óµ½ÓÒ¡£
#
# Õâ¶Î³ÌÐòʵ¼ÊÉÏÊdzöÓÚÄÚ´æµÄ¾ø¶ÔµØÖ·0¿ªÊ¼´¦¡£Ê×ÏÈÊǼÓÔظ÷¸öÊý¾Ý¶Î¼Ä´æÆ÷¡£
# ÖØÐÂÉèÖÃÈ«¾ÖÃèÊö·û±íg ......
/*
* ioctl.c ÎļþʵÏÖÁËÊäÈë/Êä³ö¿ØÖÆϵͳµ÷ÓÃioctl()£¬¸Ãº¯Êý
* Ö÷ÒªÊǵ÷Óú¯Êýtty_ioctl()¶ÔÖն˵ÄIO½øÐпØÖÆ
*/
/*
* linux/fs/ioctl.c
*
* (C) 1991 Linus Torvalds
*/
#include <string.h>
#include <errno.h>
#include <s ......
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Terris extends JFrame implements Runnable, KeyListener {
private short isPlaying=0,xOffSet = 2, yOffSet = 0, blockType = (short) Math.round(Math.random() * 6), blockRotation = 0, blockColor = (short) Math.round(Math. ......
LinuxÊÇÒ»ÖÖÀàUnixµÄ²Ù×÷ϵͳ¡£´ÓÀíÂÛÉϽ²£¬Unix±¾ÉíµÄÉè¼Æ²¢Ã»ÓÐʲôÖØ´óµÄ°²È«È±ÏÝ¡£¶àÄêÀ´£¬¾ø´ó¶àÊýÔÚUnix²Ù×÷ϵͳÉÏ·¢ÏֵݲȫÎÊÌâÖ÷Òª´æÔÚÓÚ¸ö±ð³ÌÐòÖУ¬ËùÒԴ󲿷ÖUnix³§É̶¼Éù³ÆÓÐÄÜÁ¦½â¾öÕâЩÎÊÌ⣬Ìṩ°²È«µÄUnix²Ù×÷ϵͳ¡£µ«LinuxÓÐЩ²»Í¬£¬ÒòΪËü²»ÊôÓÚijһ¼Ò³§ÉÌ£¬Ã»Óг§ÉÌÐû³Æ¶ÔËüÌṩ°²È«±£Ö¤£ ......
¡¡ÖÚËùÖÜÖª£¬ÍøÂ簲ȫÊÇÒ»¸ö·Ç³£ÖØÒªµÄ¿ÎÌ⣬¶ø·þÎñÆ÷ÊÇÍøÂ簲ȫÖÐ×î¹Ø¼üµÄ»·½Ú¡£Linux±»ÈÏΪÊÇÒ»¸ö±È½Ï°²È«µÄInternet·þÎñÆ÷£¬×÷ΪһÖÖ¿ª·ÅÔ´´úÂë²Ù×÷ϵͳ£¬Ò»µ©LinuxϵͳÖз¢ÏÖÓа²È«Â©¶´£¬InternetÉÏÀ´×ÔÊÀ½ç¸÷µØµÄÖ¾Ô¸Õß»áÓ»Ô¾ÐÞ²¹Ëü¡£È»¶ø£¬ÏµÍ³¹ÜÀíÔ±ÍùÍù²»Äܼ°Ê±µØµÃµ½ÐÅÏ¢²¢½øÐиüÕý£¬Õâ¾Í¸øºÚ¿ÍÒԿɳËÖ®»ú¡£È»¶ø ......