我花了大約5個小時的谷歌搜索,但無法找到解決方案。java不能從cmd工作
我嘗試在我的所有電腦上安裝jperf,除2之外的所有電腦均完美安裝。但是我不能強迫這兩個人跑。
一個是XP專業版(如我的電腦的一半),第二個是XP家庭版(如我的電腦的另一半)
當我運行jperf.bat - 出現在命令行窗口,然後消失。然後沒有任何反應
java.exe在路徑中 - 輸入java顯示正確的結果。
再次編輯
現在我可以看到錯誤:
C:\JPERF-~1.2>java -classpath jperf.jar;lib\forms-1.1.0.jar;lib\jcommon-1.0.10.j
ar;lib\jfreechart-1.0.6.jar;lib\swingx-0.9.6.jar net.nlanr.jperf.JPerf
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesk
top/swingx/JXTaskPaneContainer
at net.nlanr.jperf.JPerf$1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.swingx.JXTaskPaneConta
iner
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 15 more
那麼,我們能怎麼辦呢?什麼不見了???
打開命令提示符進入jperf.bat所在的目錄。然後從命令行運行它,你應該看到一個更清晰的錯誤 –
編輯問題:沒有錯誤 –