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

    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.
        -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 [url=http://www.oracle.com/technetwork/java/javase/documentation/index.html]Java SE Documentation at a Glance[/url] for more details.
    
    Process completed.

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,568
    Rep Power
    12

    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
    Posts
    2
    Rep Power
    0

    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, 08: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, 09:58 AM
  3. problem compiling servlet
    By vivek_9912 in forum Java Servlet
    Replies: 1
    Last Post: 02-13-2009, 12:37 PM
  4. problem compiling servlets
    By boy22 in forum Java Servlet
    Replies: 1
    Last Post: 08-03-2007, 11:05 AM
  5. getting problem in compiling java program?
    By sathish04021984 in forum New To Java
    Replies: 3
    Last Post: 07-30-2007, 10: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
  •