Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ubuntu Install Java JDK and JRE

Ubuntu Linux Install Sun Java Development Kit ( JDK ) and Java Runtime Environment ( JRE )
by Vivek Gite
 
Q.
How do I install Sun
Java Development Kit (JDK) and Java Runtime Environment (JRE) under
Ubuntu Linux? It appears that there are multiple JRE installed by
default under Ubuntu. How do I select and use Sun JRE only? Can you
explain steps required to set the environment to run java programs or
apps?
A.
Ubuntu Linux 7.10 has following packages from Sun:
=> sun-java6-bin
: Sun Java Runtime Environment (JRE) 6
=> sun-java6-demo
: Sun Java Development Kit (JDK) 6 demos
=> sun-java6-jdk
: Sun Java Development Kit (JDK) 6
=> sun-java6-jre
: Sun Java Runtime Environment (JRE) 6
Install Sun Java 6
Open a shell prompt (terminal) and type the following to install JDK and JRE:
$ sudo apt-get install sun-java6-bin sun-java6-jre sun-java6-jdk
Setup the default Java version
Ubuntu Linux comes with update-java-alternatives utility to updates
all alternatives belonging to one runtime or development kit for the
Java language. To select, Sun's JVM as provided in Ubuntu 7.10, enter:
$ sudo update-java-alternatives -s java-6-sun
You also need to edit a file called /etc/jvm. This file defines the
default system JVM search order. Each JVM should list their JAVA_HOME
compatible directory in this file. The default system JVM is the first
one available from top to bottom. Open /etc/jvm
$ sudo vi /etc/jvm
Make sure /usr/lib/jvm/java-6-sun is added to the top of JVM list
/usr/lib/jvm/java-6-sun
At the end your file should read as follows:
/usr/lib/jvm/java-6-sun
/usr/lib/jvm/java-gcj
/usr/lib/jvm/ia32-java-1.5.0-sun
/usr/lib/jvm/java-1.5.0-sun
/usr
Save and close the file.
Setup the environment variable
You also need to setup JAVA_HOME and PATH variable. Open your
$HOME/.bash_profile or /etc/profile (system wide) configuration. Open
your .bash_profile file:
$ vi
$HOME/.bashrc
Append following line:
#set java envir


Ïà¹ØÎĵµ£º

¹ØÓÚ¡¶Thinking In Java 4th Edition¡·µÄÒ»¸öÎÊÌâ

     ¹À¼ÆÑ§Ï°javaµÄÂòÁËBruce Eckle¡¶Thinking In Java 4th Edition¡·µÄÐÂÊÖÃÇ£¨ÎÒÒ²ÊÇ£©£¬¹À¼Æ¶à»áÓöµ½Ò»¸öÎÊÌ⣺
±àÒëʱimport static net.mindview.util.Print.*;ÕÒ²»µ½ÏàÓ¦µÄ°ü£¬print·½·¨¾ÍÓò»ÁË¡£ÏÂÃæ°ÑÎҵIJÙ×÷·½·¨Ìù³öÀ´£¬Ï£ÍûÄܰﵽÄã¡£
     1¡¢°ÑÊé±¾µÄÔ´´úÂë ......

java clone

java clone
ÎÄÕ·ÖÀà:Java±à³Ì ¹Ø¼ü×Ö: java clone
1.javaÀïµÄclone·ÖΪ£º
A:dz¸´ÖÆ£¨Ç³¿Ë¡£©: dz¸´Öƽö½ö¸´ÖÆËù¿¼ÂǵĶÔÏ󣬶ø²»¸´ÖÆËüËùÒýÓõĶÔÏó¡£
b:Éî¸´ÖÆ£¨Éî¿Ë¡£©£ºÉî¸´ÖÆ°ÑÒª¸´ÖƵĶÔÏóËùÒýÓõĶÔÏ󶼸´ÖÆÁËÒ»±é¡£
JavaÖжÔÏóµÄ¿Ë¡,ΪÁË»ñÈ¡¶ÔÏóµÄÒ»·Ý¿½±´£¬ÎÒÃÇ¿ÉÒÔÀûÓÃObjectÀàµÄclone()·½·¨¡£±ØÐëÒª ......

µÚÈýƪ£ºJAVA×Ö·û±àÂëϵÁÐÈý£ºJavaÓ¦ÓÃÖеıàÂëÎÊÌâ

1. ¸ÅÊö
±¾ÎÄÖ÷Òª°üÀ¨ÒÔϼ¸¸ö·½Ã棺±àÂë»ù±¾ÖªÊ¶£¬java£¬ÏµÍ³Èí¼þ£¬url£¬¹¤¾ßÈí¼þµÈ¡£
ÔÚÏÂÃæµÄÃèÊöÖУ¬½«ÒÔ"ÖÐÎÄ"Á½¸ö×ÖΪÀý£¬¾­²é±í¿ÉÒÔÖªµÀÆäGB2312±àÂëÊÇ"d6d0 cec4"£¬Unicode±àÂëΪ"4e2d 6587"£¬UTF±àÂë¾ÍÊÇ"e4b8ad e69687"¡£×¢Ò⣬ÕâÁ½¸ö×ÖûÓÐiso8859-1±àÂ룬µ«¿ÉÒÔÓÃiso8859-1±àÂëÀ´"±íʾ"¡£
2. ±àÂë»ù±¾ÖªÊ ......

javaºº×ÖתƴÒô

package com.navinfo.mygim.admin.util;
/*
* Pinyin.java
* vicbay
*/
public class Pinyin{
private String[] name = { "zuo", "zun", "zui", "zuan", "zu", "zou",
"zong", ......

¸øJAVAÐÂÊÖµÄÒ»·âÐÅ

Ç×°®µÄ Java ÐÂÊÖÃÇ£º
ºÜ¸ßÐËÄãÃÇÔ¸ÒâÀ´ÕâÀﹲͬѧϰ£¬
Java Õâ¸öÓïÑÔ£¬ÒѾ­²»ÔÙÊÇÓïÑÔÁË£¬Ëû¹´ÀÕ³öÒ»¸ö¿ª·ÅʽµÄ¿ª·¢»·¾³£¬
»ù±¾ÉÏ java.sum.com ºÜ´ÖÂÔµØ°Ñ Java ·ÖΪÈý¸ö²¿·Ö£º
(1)  J2SE ( Java 2 Standard Edition )
(2)  J2EE ( Java 2 Enterprise Edition )
(3)  J2ME ( Java 2 Micro Edition ) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ