I've made a program using JCreator. It was working fine and all of a sudden it won't run anymore. I get this message:

--------------------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:
    -client   to select the "client" VM
    -server   to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.
    -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.
                  set a system property
                  enable verbose output
    -version      print product version and exit
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
                  enable assertions
                  disable assertions
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
                  load native agent library <libname>, e.g. -agentlib:hprof
                    see also, -agentlib:jdwp=help and -agentlib:hprof=help
                  load native agent library by full pathname
                  load Java programming language agent, see java.lang.instrument
                  show splash screen with specified image

It happens in the output window in JCreator and in the CMD window.

If I copy the whole code and paste it into a new file, with a new name, it works.

Any ideas why? Or what I need to do to solve it? I wonder if it is because the code is around 28,000 lines? I'm now working to cut this huge number down.

Thanks guys.

Edited by adanaz: n/a

6 Years
Discussion Span
Last Post by adanaz

Well here is a hint: type "java" on your cmd...you should get that very same message. As for the size of the file I can tell you that that could be the problem, about a year ago I was writing a program that used three massive arrays and I had them all in the same class, when I went to compile that class, I got a huge error, well the solution was to put each array in its own class.


I have reduced the amount of code by using for loops instead of re-pasting each part. Now the program is less than 15,000 lines and I don't have the problem anymore!

Thanks Zetlin, for your input.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.