2009年12月24日

最近一直再用SWT/JFace做PIMS的项目,本以为已经比较了解这个平台了,而且也比较喜欢,直到从SWT跳到JFace开发时才碰到问题,就是怎么也运行不了,错误如下:

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IProgressMonitor
Caused by: java.lang.ClassNotFoundException: org.eclipse.core.runtime.IProgressMonitor
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: com.jface.applicationwindow.HelloJFace.  Program will exit.

很奇怪的是我明明已经org.eclipse.core.runtime,于是就去包里直接找IPogressMonitor,发现果然没有这个类,虽然 所有的书中都没有写要导入其他的什么包。这个问题一直困扰了我两个晚上,我一狠心就直接去eclipse/plugin里面找 IPogressMonitor,却在org.eclipse.equinox.common包中找到了这个class,真是不知道eclipse是什么 用心,好好的一个工程却放在两个包里,搞的我完全不知所以然。CSDN上有人 解释说org/eclipse/core/runtime这个包不是封装在一个jar包之下的,他们是属于两个项目的。
所以要想成用运行SWT/JFace程序必须从eclipse/plugin里面导入以下Jar文件:

org.eclipse.jface.text_3.5.1.r351_v20090708-0800.jar
org.eclipse.jface_3.5.1.M20090826-0800.jar
org.eclipse.core.runtime_3.5.0.v20090525.jar
org.eclipse.core.runtime.compatibility_3.2.0.v20090413.jar
org.eclipse.osgi_3.5.1.R35x_v20090827.jar
org.eclipse.core.commands_3.5.0.I20090525-2000.jar
org.eclipse.swt.gtk.linux.x86_3.5.1.v3555a.jar
org.eclipse.core.runtime.compatibility.auth_3.2.100.v20090413.jar
org.eclipse.equinox.common_3.5.1.R35x_v20090807-1100.jar

还发现一个比较好的网站:http://www.findjar.com/index.x
大家遇到找不到JAR文件的时候可以去这里找找。
posted @ 2009-12-24 14:59 Cabinw 阅读(1336) | 评论 (0)编辑 收藏

2009年12月21日

由于学校使用DRCOM登陆网络,自己还没申请帐号,一直用别人的所以每次进入Ubuntu就要进入shell修改MAC地址,很麻烦,所以前几天就用java自己鼓弄了一个修改器, 功能不是很强大,只能满足基本修改功能。系统必须安装JRE6,因为程序应用了JDK6的新特性。在Ubuntu 9.04 和 9.10下测试成功。

本来想用Python写的,奈何PyGTk不是很熟,就忍不住先用java写了。但是Java的客户端能力实在不敢恭维,所以只草草完成了部分功能,以后再用Python加强。
欢迎大家报告bug,感激不尽!

下载链接


Gmail/Gtalk:cabinw@gmail.com

初始界面:



输入全数字字母地址后按Change即可:


可以勾选save this address,保存历史记录



在地址后加冒号可以为历史地址添加标签



成功修改:


About:

posted @ 2009-12-21 11:26 Cabinw 阅读(350) | 评论 (0)编辑 收藏

2009年12月20日

The Java Console provides information about the Java Runtime Environment (JRE) version, user home directory, and any error message that occurs while running an applet or application. You can enable the Java Console for the Linux platform. Enabling the Java Console for Linux Platform

  1. Open a terminal window
  2. Go to JRE Installation Directory.
    cd /java/jre1.5.0_04 (Change the name of the directory to where you have installed the JRE)
  3. Open the Java Control Panel. Type: ./ControlPanel
  4. You can also open the Java Control Panel through your browser. Launch Netscape or Mozilla. Open the ControlPanel.html file which usually is found in the $JAVA_HOME/jre/ directory
  5. In the Java Control Panel, click the Basic tab
  6. Select Show Console radio button
  7. Click the Apply button

posted @ 2009-12-20 22:22 Cabinw 阅读(691) | 评论 (0)编辑 收藏
仅列出标题  

导航

<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

统计

常用链接

留言簿

随笔分类

随笔档案

相册

搜索

最新评论

阅读排行榜

评论排行榜