关于最新版的JCreator只能编译不能运行的问题


一、前缀~

最近重新看Java,别人推荐了一款轻量级的IDE,没错,就是JCreator。

它主要有两个版本:Pro和LE版本,其中Pro收费,LE版免费,但是功能相对于Pro更不齐全。

我下载的是csdn上的Pro破解版,传送门:http://download.csdn.net/download/liujun13579/4430786

安装完后感觉蛮不错的,又小又快,界面有点模范vs的感觉~


二、问题描述

废话不多说,先说说问题:

情形:某个文件夹中有一个test.java文件,我双击打开(默认使用JCreator),但是当我F5编译和运行时,

问题出现了。

首先是编译,没有问题,编译成功,也产生了.class文件

然后调转到运行窗口,问题来了:


--------------------Configuration: <Default>--------------------
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 <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  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[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  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: <Default>--------------------
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 <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  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[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See  http://www.oracle.co...tion/index.html for more details. 

    #2nyccanuck

    • Advanced Member

    • Members
    • PipPipPip
    • 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打开文件,这个时候就能运行了~!

        如果你有好的解决办法,请留言告诉我哦~!


        转载自我的另一个博客~:http://www.jxxn.net/home/space.php?uid=1&do=blog&id=14


        • 3
          点赞
        • 1
          收藏
          觉得还不错? 一键收藏
        • 2
          评论

        “相关推荐”对你有帮助么?

        • 非常没帮助
        • 没帮助
        • 一般
        • 有帮助
        • 非常有帮助
        提交
        评论 2
        添加红包

        请填写红包祝福语或标题

        红包个数最小为10个

        红包金额最低5元

        当前余额3.43前往充值 >
        需支付:10.00
        成就一亿技术人!
        领取后你会自动成为博主和红包主的粉丝 规则
        hope_wisdom
        发出的红包
        实付
        使用余额支付
        点击重新获取
        扫码支付
        钱包余额 0

        抵扣说明:

        1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
        2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

        余额充值