JAVA »ñµÃIPµØÖ·
1. java »ñÈ¡ipµØÖ·µÄ´úÂë
String loacalIp = "";
try
{
InetAddress localhost = InetAddress.getLocalHost();
loacalIp =localhost.getHostAddress();
//System.out.println("localhost: "+localhost.getHostAddress());
//System.out.println("localhost: "+localhost.getHostName());
}
catch(UnknownHostException uhe)
{
System.err.println("Localhost Ip exception " + uhe.toString());
}
A£º´Ë´úÂëÔÚwindows ÏÂÃæ»ñÈ¡ipµØÖ·ÊÇÍêÈ«ÕýÈ·¡£
B£º´Ë´úÂëÔÚlinuxÏÂÃæÈ¡µÃµÄipµØÖ·×ÜÊÇ:127.0.0.1
2.ΪÁË»ñÈ¡linuxÏÂÃæÕýÈ·µÄipµØÖ·
ÐÞ¸ÄetcÏÂÃæµÄhostsÎļþ
***.***.***.*** localhost.localdomain localhost
ÐÞ¸ÄΪ±¾»úµÄipµØÖ·£¬¶ø²»ÊÇ127.0.0.1
¾ßÌåÐ޸ĵķ½·¨£¬µ±È»ÊÇÓÃvi½øÐб༡£±£´æºó²»ÓÃÖØÆô»úÆ÷£¬¼´¿É¡£
Ïà¹ØÎĵµ£º
public class Test {
public static void main(String args[]) {
int i;
int j;
for (i = 1; i <= 9; i++) {
for (j = 1; j <= i; j++) {
if (j * i <= 9)
System.out.print(j ......
ÔÚÕâÀï½éÉÜÁ½ÖÖ·½·¨Éú³Éjar£¬µÚÒ»ÖÖÊÇÓÃEclpiseµÄExport¹¦ÄÜ¡£ÔÚÒª´ò°üµÄÏîÄ¿ÉÏ»÷ÓÒ¼ü£¬Ñ¡ÔñExport£¬ÔÚ´°¿ÚÖÐÑ¡ÔñJavaÀïµÄJAR file¡£NextºóµÄ´°¿ÚÖÐÒѾ×Ô¶¯Ñ¡ºÃÁËÒª´ò°üµÄÏîÄ¿£¬Óû§¿ÉÒÔµã»÷¼ÓºÅ²é¿´ÏîÄ¿Àï±»´ò°üµÄÄÚÈÝ¡£ÔÚÏÂÃæµÄJAR fileÀïÉèÖÃÄã´ò°üÉú³ÉjarÎļþµÄÊä³öĿ¼£¬ÏÂÒ»²½ÔÚ³öÏֵĴ°¿ÚÖÐÑ¡ÔñUse existin ......
ÆäʵÕÆÎÕ
MappedByteBuffer
²¢²»ÄÑ£¬Ö»Òª¼Çס“Èý·½Èý·¨ÈýÌØÐÔ”£¨ÎÒ×Ô¼º×ܽáµÄ£¬ºÇºÇ
~~
²»ÒªÈÓ¼¦µ°Å¶¡£¡£¡££©Õâ¾ä»°¾Í¿ÉÒÔÇáËɸ㶨£¡
MappedByteBuffer
Ö»ÊÇÒ»ÖÖÌØÊâµÄ
ByteBuffer
£¬¼´ÊÇ
ByteBuffer
µÄ×ÓÀà¡£
MappedByteBuffer
½«ÎļþÖ±½ÓÓ³Éäµ½Äڴ棨ÕâÀïµÄÄÚ´æÖ¸µÄÊÇÐéÄâÄڴ棬²¢² ......
Ò»¡¢JDBCµ÷Óô洢¹ý³Ì
creat proc proc_select
¡¡¡¡@pid varchar(20)
¡¡¡¡@address varchar(20) output
¡¡¡¡as
¡¡¡¡select @address=address from userinfo where pid=@pid
¡¡¡¡go
¡¡¡¡ÓÃjavaµ÷ÓÃ:
¡¡¡¡class.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\"); //¼ÓÔØÇý¶¯
¡¡¡¡Connection con=DriverManager.ge ......
²»ÌᳫʹÓõķ½·¨ÊÇΪ֧³ÖÏòºó¼æÈÝÐÔ¶ø±£ÁôµÄÄÇЩ·½·¨£¬ËüÃÇÔÚÒÔºóµÄ°æ±¾ÖпÉÄܳöÏÖ£¬Ò²¿ÉÄܲ»³öÏÖ¡£Java ¶àÏß³ÌÖ§³ÖÔÚ°æ±¾ 1.1 ºÍ°æ±¾ 1.2 ÖÐ×öÁËÖØ´óÐÞ¶©£¬stop()¡¢suspend() ºÍ resume() º¯ÊýÒѲ»ÌᳫʹÓá£ÕâЩº¯ÊýÔÚ JVM ÖпÉÄÜÒýÈë΢ÃîµÄ´íÎó¡£ËäÈ»º¯ÊýÃû¿ÉÄÜÌýÆðÀ´ºÜÓÕÈË£¬µ«ÇëµÖÖÆÓÕ»ó²»ÒªÊ¹ÓÃËüÃÇ¡£
µ÷ÊÔÏ̻߳¯µÄ ......