一、字首~
最近重新看Java,别人推薦了一款輕量級的IDE,沒錯,就是JCreator。
它主要有兩個版本:Pro和LE版本,其中Pro收費,LE版免費,但是功能相對于Pro更不齊全。
我下載下傳的是csdn上的Pro破解版,傳送門:http://download.csdn.net/download/liujun13579/4430786
安裝完後感覺蠻不錯的,又小又快,界面有點模範vs的感覺~
二、問題描述
廢話不多說,先說說問題:
情形:某個檔案夾中有一個test.java檔案,我輕按兩下打開(預設使用JCreator),但是當我F5編譯和運作時,
問題出現了。
首先是編譯,沒有問題,編譯成功,也産生了.class檔案
然後調轉到運作視窗,問題來了:
--------------------Configuration:
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
-hotspot is a synonym for the "server" VM [deprecated]
The default VM is server.
-cp
-classpath
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:
-enableassertions[:
enable assertions with specified granularity
-da[:
-disableassertions[:
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:
load native agent library
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:
load native agent library by full pathname
-javaagent:
load Java programming language agent, see java.lang.instrument
-splash:
show splash screen with specified image
See http://www.oracle.co...tion/index.html for more details.
以上明顯就是你在指令行輸入java時出現的幫助文檔,我就在想可能是配置出了問題:
于是在Configure中檢查,沒有發現問題...
于是我打開了Options-->JDK Tools-->run application中的show command line,想看看具體的指令
再次運作,果然,問題出現了:
以下是執行的指令:
Command : "D:\jdk\bin\java.exe" -classpath "F:\學習筆記\java學習筆記\java代碼\test;D:\jdk\jre\lib\rt.jar;D:\jdk\lib\dt.jar;D:\jdk\lib\tools.jar;D:\jdk\jre\lib\ext\dnsns.jar;D:\jdk\jre\lib\ext\localedata.jar;D:\jdk\jre\lib\ext\sunjce_provider.jar;D:\jdk\jre\lib\ext\sunmscapi.jar;D:\jdk\jre\lib\ext\sunpkcs11.jar"
你是否發現好像少了點什麼?沒錯,怎麼最後沒有跟檔案名啊!!
正常情況應該是(java test),但在這裡test不見了~~
問題是發現了,但是如何解決呢?
三、解決問題
于是我就在百度上查找,但是很多都是錯誤的答案,于是俺就上Google找,
輸入 JCreator can‘t run,查詢,google果然不負我啊,第一條就是答案~
以下是老外的原文:
I have JCreator Pro 5.00.016
Up until today everything was fine. I ran a program this morning and everything worked just fine, now when I try and run it I get the following output.
Please let me know what I can do to correct this.
Thank you.
--------------------Configuration:
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
-hotspot is a synonym for the "server" VM [deprecated]
The default VM is server.
-cp
-classpath
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:
-enableassertions[:
enable assertions with specified granularity
-da[:
-disableassertions[:
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:
load native agent library
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:
load native agent library by full pathname
-javaagent:
load Java programming language agent, see java.lang.instrument
-splash:
show splash screen with specified image
See http://www.oracle.co...tion/index.html for more details.
#2nyccanuck Advanced Member 關于最新版的JCreator隻能編譯不能運作的問題 Members 關于最新版的JCreator隻能編譯不能運作的問題 關于最新版的JCreator隻能編譯不能運作的問題 關于最新版的JCreator隻能編譯不能運作的問題 77 posts Posted 11 February 2012 - 06:20 AM
Update:
Still will not run in Pro version.
It will run in the LE version.
Would like to know what to do as I have paid for Pro and am not able to use it!
大概的意思就是說:碰到了和我我一樣的問題,如何解決,最後他抱怨說LE版本沒問題,反倒是花了錢買的卻不能運作~~(俺用的是盜版,就不好跟着起哄了~)
最後,經過和管理者的一系列探讨:這是bug....
需要等待更新,暫時的解決辦法有以下幾個:
1.建立一個projiect,每次打開projiect來運作,這樣就沒有問題
2.不要直接從檔案打開JCreator,而是先打開JCreator,并且保證start page tab打開了,然後再點選open打開檔案,這個時候就能運作了~!
如果你有好的解決辦法,請留言告訴我哦~!