To successfully set up RMI communications, you need three components: rmiregistry, a server, and a client. Once rmiregistry and the server are running, the client should be able to connect to the server successfully. See generic RMI server-client implementations on how to connect a client to a server. This tutorial helps you set up such necessary components in Eclipse. Read More
posted @ 2013-10-09 21:49 geeky_jane Views(134) Comments(0) Diggs(0) Edit
在写代码的过程中,我们会发现有些对象,其实我们只需要一个实例,比方说:线程池(threadpool)、日志对象等,这时候就需要用到“单例模式”,可以创建唯一的实例。 Read More
posted @ 2013-09-15 22:31 geeky_jane Views(194) Comments(0) Diggs(0) Edit
写代码时,为了更方便地查看代码用时,通常会在方法开始和结束的地方分别用System.nanoTime取时并计算差值,但是输出结果却看得很别扭,查了下,System.nanoTime()返回的是nanoSeconds,而我们一般都是看的分啊秒啊什么的,可以通过TimeUnit来做nanoSeconds和seconds之间的转换,方便快捷。 Read More
posted @ 2013-09-11 22:19 geeky_jane Views(10013) Comments(0) Diggs(0) Edit
查看文件可以说是最常用的功能之一了,比如我们的程序出现问题,经常要检查log文件,这时候就要用到查看文件的功能了,经常用到的有以下这几个命令: cat:由第一行开始显示文件内容 tac:从最后一行还是显示内容 nl:显示行号 more:翻页显示 less:翻页显示,并且可以向前翻页 head:只看头几行 tail:只看结尾几行 Read More
posted @ 2013-09-08 20:49 geeky_jane Views(830) Comments(0) Diggs(0) Edit
Description: Less is a program similar to more, but which allows backward movement in the file as well as forward movement. Also, less does not have to read the entire input file before starting, so with large input files it starts up faster than text editors like vi. Less uses termcap (or terminfo on some systems), so it can run on a variety of terminals. There is even limited support for hardcopy terminals. (On a hardcopy terminal, lines which should be printed at the top of the screen are pre Read More
posted @ 2013-09-08 20:35 geeky_jane Views(1922) Comments(0) Diggs(0) Edit
垃圾回收器工作时,将一面回收空间,一面使堆中的对象紧凑排列,也就尽量避免了页面错误。通过垃圾回收器对对象重新排列,实现了一种高速的、有无限空间可供分配的堆模型。 Read More
posted @ 2013-09-07 23:21 geeky_jane Views(248) Comments(0) Diggs(0) Edit
ls是最常用的Linux命令之一,man方法很容易查到其功能和用法了,网上一搜也一大把,这篇随笔主要记录了ls -l 输出结果中各列的含义: Read More
posted @ 2013-07-28 21:40 geeky_jane Views(455) Comments(0) Diggs(0) Edit
Linux和Windows比起来一个显著的特点就是多用户、多任务,在这样一个相对较复杂的使用环境中,保护好自己的文件就显得尤其重要了,这时就需要了解怎么控制一个文件的读、写、执行的权限啦... Read More
posted @ 2013-07-07 18:22 geeky_jane Views(607) Comments(0) Diggs(0) Edit
这篇是纯记录,觉得自己以后很有可能猪头嘻嘻地忘掉root密码,所以记下来备忘。先将系统重新启动,在读秒的时候按下任意键就会出现如下的菜单画面... Read More
posted @ 2013-07-06 20:39 geeky_jane Views(429) Comments(0) Diggs(0) Edit
Linux中,由于是多用户操作环境,并且每个感都是后台执行的,因此我们不知道还有多少人同时在这个主机上工作,如果贸贸然关机,可能对他人造成很大的影响,比如文件系统的损坏等。这时,正确的关机方法就体现出重要性了... Read More
posted @ 2013-07-06 20:38 geeky_jane Views(360) Comments(0) Diggs(0) Edit