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: I am a new Java user, I can't use "javac" in my computer

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I am a new Java user, I can't use "javac" in my computer

    I am a new Java user, I can't use "javac" in my computer, but I can see i can use java.exe, javacpl.exe, javaw.exe, javaws.exe.
    In addition, i am using jre7.
    Please help me to start using java. Thanks a lot.


  2. #2
    Member
    Join Date
    Sep 2013
    Posts
    68
    My Mood
    Confused
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default Re: I am a new Java user, I can't use "javac" in my computer

    If you are using windows then follow these steps
    1. Install JDK.
    2. After completing the installation of JDK you have to set the classpath variables.

    To set the classpath follow the instructions given below:

    1. Right Click on My Computer icon and then click on Properties.

    2. Click on the Advanced Tab and then on Environment Variables.

    3. Here you have to define two system variables named PATH and JAVA_HOME.

    The variable PATH will have the path up to bin directory in your installed JDK folder and variable JAVA_HOME will be the parent directory of the JDK installation.

  3. #3
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: I am a new Java user, I can't use "javac" in my computer

    I am using company pc, it should be installed jre7.
    But how can I make sure JDK was installed or not?

    After I followed your method, I saw below in the environment variables:
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShel l\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Prog ram Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;k:\

    It seems no "Bin" directory.

    If my current is really not installed JDK, what JDK should I download and install?
    1) Oracle JDK (Java SE Development Kit 7 - Downloads | Oracle Technology Network | Oracle), or
    2) Eclipse for Java developer (http://www.eclipse.org/downloads/dow...nter-win32.zip), or
    3) Open JDK (OpenJDK) ?

    I just want to write java programs, complie, and see the program results, to start revising/learning java programming.

    Thanks a lot!

  4. #4
    Forum VIP
    Join Date
    Jun 2011
    Posts
    317
    My Mood
    Bored
    Thanks
    47
    Thanked 89 Times in 74 Posts
    Blog Entries
    4

    Default Re: I am a new Java user, I can't use "javac" in my computer

    1) Java SE Development Kit 7. Install this. You need it to compile java programs.
    2) Eclipse. Optional. This is an IDE, it makes programming easier by highlighting syntax errors, code completion and much much more. You don't need it to get started but it's nice to have.
    3) Open JDK. Don't get this. It's the source code for Java itself and only really of interest to academics and Oracle staff.

  5. #5
    Member
    Join Date
    Nov 2013
    Location
    Bangalore, India
    Posts
    70
    My Mood
    Cool
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default Re: I am a new Java user, I can't use "javac" in my computer

    Once you have installed JDK you need to add PATH variable like "C:\Program Files\Java\jdk1.6.0_18\bin". Then only javac will be a recognised command. Enjoy programming

  6. #6
    Junior Member
    Join Date
    Oct 2013
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: I am a new Java user, I can't use "javac" in my computer

    You'll need to get a Java Development Kit (JDK).

  7. #7
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: I am a new Java user, I can't use "javac" in my computer

    Eclipse is a fancy source code editor / IDE and requires the JDK. As many have already advised, you need to install the JDK. You may also use the OpenJDK if you like, but there are occasional compatibility problems. I haven't heard of many lately, but maybe I haven't been looking.

Similar Threads

  1. Replies: 2
    Last Post: June 22nd, 2013, 10:30 AM
  2. Replies: 1
    Last Post: April 7th, 2013, 03:40 PM
  3. Replies: 3
    Last Post: December 7th, 2011, 02:03 AM
  4. Replies: 7
    Last Post: August 13th, 2011, 01:22 AM
  5. "java.lang.NoSuchMethodError: main" and "fatal exception occured."
    By joachim89 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 10th, 2010, 08:35 AM