23 2010

subversion.javahl.ClientException

今天用在Eclipse使用subclipse插件的时候,遇到一个问题:

org.tigris.subversion.javahl.ClientException: Couldn’t perform atomic initialization svn: Couldn’t perform atomic initialization
Authorization failed
svn: Could not initialize the SASL library

查了好长时间都没有找到解决方式,无意间在SVN配置中将SVN接口 Client由JavaHL(Jni) 改成 Svn Kit(Pure Java),竟然好了。

后来查了下,JavaHL和Svn Kit都是Subclipse SVN客户端与SVN服务交互的一种方式,JavaHL使用JNI的调用SVN的本地库,速度快,稳定可靠。

同事说的对,不能太依靠于搜索引擎去查找相同的问题的解决方式,遇到问题先自己静下心来分析一下,远比漫无目的的搜索强得多。


十一 2 2009

Eclipse打开文件所在文件夹

在进行项目开发的时候,经常需要从我的电脑中打开相应文件目录,遗憾的是Eclipse并没有提供该功能,采用EasyExplorer插件就可以比较好地弥补这一不足。

详细介绍:http://www.360doc.com/content/080619/11/59141_1349968.html
EasyExplorer:http://sourceforge.net/projects/easystruts/


25 2009

Eclipse 3.5 Ant运行中断问题

在Eclipse3.5里运行Ant的时候会莫名其妙地中断,导致无法成功构建项目。可能是由于Eclipse中Ant默认的Logger导致的。解决办法:运行Ant,弹出Edit Configration窗口,选择Main选项卡,在Arguments处添加参数“-logger org.apache.tools.ant.NoBannerLogger”。

详细内容:http://hi.baidu.com/zh_m_zhou/blog/item/2772d0171f442e58f2de3257.html


15 2009

Eclipse不能自动编译

将Eclipse的Build Path中引入的所有Libraries全部删除,然后重新引入,就解决了。原因可能是引入了实际路径中不存在的Jar包。

还有其它导致Eclipse不能自动编译的原因,参照:http://www.blogjava.net/javafield/archive/2008/01/05/172940.html


20 2009

Properties Editor Eclipse属性文件编辑插件

Properties Editor是一个专门用来编辑Properties属性文件的Eclipse插件,安装Properties Editor插件后,修改Properties属性文件,就不必再使用native2ascii工具进行字符编码转换了。

Properties Editor: http://propedit.sourceforge.jp/index_en.html


11 2009

Eclipse E4/XWT

在Eclipse最新版E4中,添加了一项新的技术XWT,下面是XWT的官方介绍:

XWT is a declarative UI designed for Eclipse. It is a powerful and lightweight framework. It uses XML as UI markup language.

XWT simplifies UI programming. You can create visible UI elements in the declarative XML markup with a physical separation of the UI definition from the run-time logic. An XML based declarative language is very intuitive for creating interfaces ranging from prototype to production, especially for people with a background in web design and technologies.

简而言之,XWT采用XML作为描述用户界面的标记语言,简化了图形界面编程,可以很容易的将界面绘制代码与业务逻辑代码分离。

只是粗略地查看了E4与XWT,至于详细情况,还有待慢慢研究。

e4 project: http://www.eclipse.org/e4/
e4 wiki: http://wiki.eclipse.org/E4
XWT wiki: http://wiki.eclipse.org/E4/XWT
XWT demo: http://wiki.eclipse.org/E4/XWT/Running_the_demos


15 2009

[转]Eclipse下Ant的使用

目前的Eclipse都集成了ant,本文图示如何在eclipse下使用ant
1.新建Java Project-新建Java文件HelloWorld.java
HelloWorld.java
package example;
public class HelloWorld {
public static void main(String[] args) {
System.out.println(“Hello World”);
}
}
2.在工程根目录下新建build.xml
build.xml
<?xml version=”1.0″ encoding=”utf-8″?>
<project default=“main” basedir=“.”>
<target name=“main” depends=“compile, compress” description=“Main target”>
<echo>Building the .jar file.</echo>
</target>
<target name=“compile” description=“Compilation target”>
<javac srcdir=“${basedir}/src/example” />
</target>
<target name=“compress” description=“Compression target”>
<jar jarfile=“HelloWorld.jar” basedir=“${basedir}/src/example” includes=“*.class” />
</target>
</project>
此脚本文件内容是编译/src/example下的java文件,并就地生成class文件,将这个class文件打成jar包,HelloWorld.jar
更多信息请访问:“子 孑” 博客,http://zhangjunhd.blog.51cto.com/113473/128317

十一 17 2008

利用XMind进行头脑风暴

XMind是一款易用性很强的可视化思维软件,通过XMIND可以随时开展头脑风暴,帮助人们快速理清思路。比较不错的是,XMind提供了Eclipse插件的形式并且属于开源软件。想要测试一下的朋友可以到XMind官网进行下载,XMind提供了免费版本。下面是用XMind构造的思路图:

XMind官网:http://www.xmind.net/


十一 12 2008

Eclipse 如何快捷打出System.out.println()

System.out.println("")是Java开发测试中最常用的一条语句了,如果每次都要输入这么一长串字符,是不是感觉有点厌烦?幸亏Eclipse提供了Code Assist功能,我们可以在Windows-Preferences-Java-Editor-Templates设置一下(按下图所示)。然后在编辑代码的时候输入out,按Alt+/就可以了。


10 2008

在Eclipse中配置SWT

只需要在项目属性Add External JARs处添加 org.eclipse.swt.win32.win32.x86_3.4.0.v3448f.jar,随着eclipse版本的变化SWT JAR包的名称可能也会有相应变化,现在使用的eclipse版本是3.4.0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import org.eclipse.swt.widgets.*;
 
public class Test {
 
	public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new Shell(display);
		shell.setText("www.hijava.org");
		shell.setSize(500, 400);
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}
 
}