Results 1 to 3 of 3
  1. #1
    Esanders323 is offline Member
    Join Date
    Jan 2012
    Rep Power

    Default Problem Compiling

    I'm trying to compile a .java file that I created in JCreator however, I am having a problem. I'm getting this:

    Java Code:
    --------------------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.
                      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 | -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
                      enable assertions with specified granularity
                      disable assertions with specified granularity
        -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
    See [url=]Java SE Documentation at a Glance[/url] for more details.
    Process completed.

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power

    Default Re: Problem Compiling

    I don't know JCreator, but that output comes from attempting to run a program, not compile it.

    To compile you use the javac executable, not the java executable as shown in the output.

    Maybe someone here can describe the process of how you compile. (there is nothing obvious on the vendor's website!) Otherwise check the product's documentation and make sure you are selecting "compile" rather than "run".

  3. #3
    Esanders323 is offline Member
    Join Date
    Jan 2012
    Rep Power

    Default Re: Problem Compiling

    Thanks for the reply!

    I seemed to figure out the problem even though I don't understand it. Even after building the file then running it I was getting the error.

    For some reason when I right click the .java file and click open with JCreator I get that error posted above.
    However, if I open JCreator then open the .java file through JCreator it works fine.

Similar Threads

  1. Problem Compiling
    By PmRg in forum Java Applets
    Replies: 15
    Last Post: 03-13-2011, 07:54 PM
  2. Having a Problem Compiling with 2 methods
    By Hey Taclone in forum New To Java
    Replies: 7
    Last Post: 05-06-2010, 08:58 AM
  3. problem compiling servlet
    By vivek_9912 in forum Java Servlet
    Replies: 1
    Last Post: 02-13-2009, 11:37 AM
  4. problem compiling servlets
    By boy22 in forum Java Servlet
    Replies: 1
    Last Post: 08-03-2007, 10:05 AM
  5. getting problem in compiling java program?
    By sathish04021984 in forum New To Java
    Replies: 3
    Last Post: 07-30-2007, 09:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts