Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 7 of 7

Thread: Compiling Java

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Compiling Java

    I have decided to start learning Java to help me get at least a basic understanding of what is going on. In the tutorial on the oracle website I am told to use command prompt as my way of directing my file to be compiled however it responds every time saying that javac is not a command or operable program or batch file. I have tried pointing it in the right directory and it still does not work, so I was wondering if anyone knows what I am doing wrong or if there is a better compiler I can use that is free, not on a trial and has all features available.


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Compiling Java

    That same tutorial contains a page listing common problems and their solutions: Lesson: Common Problems (and Their Solutions) (The Java™ Tutorials > Getting Started)
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Junior Member
    Join Date
    Feb 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Compiling Java

    I looked at the list of common problems and attempted to solve mine but I could not fix it.

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: Compiling Java

    Did you look at the link I sent you? Your error is the first one explained. We really can't tell you anything other than what it says there, at least not without more information. What part confuses you?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Junior Member
    Join Date
    Feb 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Compiling Java

    Now, when attempting by writing out the full path for javac, cmd responds by saying that "The system cannot find the path specified."

  6. #6
    Junior Member
    Join Date
    Feb 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Compiling Java

    The path of my javac is "CProgram Files>Java>jdk1.7.0_02>bin>javac.exe". How exactly should I write this in cmd?

  7. #7
    Junior Member
    Join Date
    Feb 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Compiling Java

    PROBLEM SOLVED. I realised that I needed to use quote/speech marks to specify the directory as it contained spaces in one of the folder names.
    Last edited by TANKDS; February 6th, 2012 at 02:38 PM.

Similar Threads

  1. Compiling
    By yavo in forum Java Theory & Questions
    Replies: 1
    Last Post: December 24th, 2011, 07:42 AM
  2. Compiling error
    By Bri4n in forum Java Theory & Questions
    Replies: 5
    Last Post: November 7th, 2011, 10:26 PM
  3. Java compiling windows 7 problem
    By wiseone in forum The Cafe
    Replies: 3
    Last Post: July 26th, 2011, 03:06 AM
  4. Help with Compiling
    By w.spidey in forum Object Oriented Programming
    Replies: 10
    Last Post: September 9th, 2010, 01:48 PM
  5. Need help compiling java class files
    By peahead in forum What's Wrong With My Code?
    Replies: 5
    Last Post: February 11th, 2010, 09:04 AM

Tags for this Thread