易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

Java正则表达式(总结一)

1.正则表达式结构简介:
小知识:{} 定义了一个范围  [] 定义了一个字符类 () 定义了一个组
*前面出现0次以上   + 前面匹配一次以上 ?前面出现0次或一次
1).字符:
x------字符x
\\-----反斜杠
\0n----十进制数 (0 <= n <= 7)
\0nn---十进制数0nn (0 <= n <= 7)
\0mnn--十进制数 ......

Java 中两种ftp操作方式

最近看到几篇关于java中操作ftp的文章,所以想写一个总结贴,标记一下,方便以后应用。
首先,我们可以应用java中的ftp库,java中提供了一个ftpclient的类,提供了很多操作ftp的方法。
先上代码,一看便知,很简单,应用时只要传递相应的server,user,password等就行了。
import java.io.IOException;
import sun.net. ......

Google Maps API in Java ME

Here is a simple library to query Google Maps with the following features:
geocode addresses to their geographic coordinates
retrieve static images with given custom size, format and zoom
To see a live sample of this API, you can check here: Java ME Google Maps API sample MIDlet
Contents
[h ......

Java程序的问题

这是一段我参考的Java程序字段,已经调试可以通Eclipse运行了,代码有点看不懂,哪位高手可以帮我做个中文注释?谢谢啦~~
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import ja ......

JAVA操作XML的完整例子


JAVA操作XML的完整例子——W3C DOM
JAVA操作XML的完整例子——W3C DOM篇收藏
这是一个用JAVA W3C DOM 进行XML操作的例子,包含了查询、增加、修改、删除、保存的基本操作。较完整的描述了一个XML的整个操作流程。适合刚入门JAVA XML操作的朋友参考和学习。
假设有XML文件:test1.xml
<?xml v ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号