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 閱讀(1349) | 評論 (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 閱讀(361) | 評論 (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 閱讀(705) | 評論 (0)編輯 收藏
          僅列出標題  

          導航

          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          統計

          常用鏈接

          留言簿

          隨筆分類

          隨筆檔案

          相冊

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 乌恰县| 宜丰县| 祁东县| 和平县| 乳山市| 万盛区| 鸡东县| 临安市| 汉阴县| 山东省| 龙门县| 陕西省| 本溪| 额尔古纳市| 安阳县| 仙居县| 枞阳县| 绥化市| 沙雅县| 潞西市| 保康县| 东乌珠穆沁旗| 中方县| 万年县| 观塘区| 浏阳市| 斗六市| 涟源市| 页游| 文成县| 兴义市| 娄烦县| 高青县| 儋州市| 鄂尔多斯市| 宝兴县| 凤翔县| 抚顺县| 杭锦旗| 池州市| 汉川市|