存档

文章标签 ‘Java’

NetBeans 6.1 for Windows 中文版的字体大小设置

2008年10月17日 admin 1 条评论

今天在Windows下安装了NetBeans 6.1中文版,安装完运行之后发现菜单中的中文字体非常小,并且有锯齿,非常难看,不像Linux下那样至少没有锯齿。

于是在网络上搜索了一番,找到解决方法:打开配置文件:C:\Program Files\NetBeans 6.1\etc\netbeans.conf 修改其中的netbeans_default_options开头的行,在末尾加入参数–fontsize 12即可,注意把双引号留在此行末尾。然后保存,重启NetBeans,字体就非常漂亮了!

分类: 瑞豪开源VPS 标签:

转载: Creating thumbnails with Java

2008年6月3日 admin 2 条评论

This article describes problems with batch thumbnail (small preview image) generation using Java. If you’re dealing with image file batch processing under Java, you might be interested in this because the errors I encountered and describe occur rarely, and code which seemed to work with the 100 files you tested it with may fail when running on 100,000 files coming from different sources (so, not just your own digital camera, as an example). If you have little time, just look out for the boxed recommendation paragraphs 1, 2, 3, 4, 5, 6). This article is a work in progress, to some extent a field report. If you feel that I misrepresented something (or plain didn’t get it), please send me a mail !

原文链接在 http://schmidt.devlib.org/java/creating-thumbnails-with-java.html

这篇文章讲的不错,但实在太长,我拷贝粘贴到WP里面保存都保存不了,所以只转载个开头,原文还是去原地方看吧!

分类: 瑞豪开源VPS 标签:

三分钟整合Apache和Tomcat

2008年5月24日 admin 没有评论

在Ubuntu 8.04和Debian 4.0整合Apache和Tomcat实在太方便了。其他Linux可能要麻烦点。

安装
在安装Apache,JDK,Tomcat的过程很简单,一个命令搞定:
在Deiban下:apt-get install apache2 sun-java5-jdk tomcat5.5-webapps libapache2-mod-jk
在Ubuntu下:apt-get install apache2 sun-java5-jdk tomcat5.5-webapps libapache2-mod-jk

访问本机的80端口,确保apache启动了;
访问本机的8180端口,确保tomcat启动了(Debian/Ubuntu的tomcat默认8180端口)

以上命令把apache的jk插件也安装了,不用编译jk了。jk的配置文件安装在了/etc/libapache2-mod-jk/workers.properties
修改这个文件,修改后的有效内容是:

workers.tomcat_home=/usr/share/tomcat5.5
workers.java_home=/usr/lib/jvm/java-1.5.0-sun-1.5.0.14
ps=/
worker.list=ajp13_worker
worker.ajp13_worker.port=8009
worker.ajp13_worker.host=localhost
worker.ajp13_worker.type=ajp13

然后配置apache的配置文件/etc/apache2/apache2.conf,在文件的最后加入:

JkWorkersFile /etc/libapache2-mod-jk/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel info
JkLogStampFormat “[%a %b %d %H:%M:%S %Y] ”
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat “%w %V %T”
JkMount /* ajp13_worker

重新启动apache: /etc/init.d/apache2 restart

然后用浏览器访问apache,就会出现tomcat的页面了,大功告成!

分类: 瑞豪开源VPS 标签: , ,