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 2 of 2

Thread: Getting Java Path Issue

  1. #1
    Junior Member
    Join Date
    Dec 2020
    Location
    Gwalior
    Posts
    11
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Getting Java Path Issue

    I tried to compile a java file and run the program from here https://www.interview.com/online-java-compiler/ I got the "javac isn't recognized as an internal or external command" error. Last week it worked just fine.

    The PATH variable seems to have been modified by something. I've tried changing it back to the correct address (C:\Program Files (x86)\Java\jdk1.7.0\bin), but it doesn't seem to reset. When I go into cmd and type Echo %PATH%, I get the following message.

    C:\WinAVR-20100110\bin;C:\WinAVR-20100110\utils\bin;set PATH="C:\WinAVR-20100110
    \bin;C:\WinAVR-20100110\utils\bin;C:\Program Files (x86)\Java\jre7\bin"

    How should I change the PATH variable?

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Getting Java Path Issue

    The javac.exe file is in the JDK. For the OS to find it, the PATH variable needs to point to the JDK's bin folder.
    The posted contents of the PATH does not make sense. The set command should not be part of the PATH.
    The PATH should just be valid paths that the OS can use to find commands to execute.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Problem with Java Path.
    By PadmaCh in forum Member Introductions
    Replies: 3
    Last Post: May 15th, 2014, 08:45 AM
  2. Issue with PATH system variable
    By Melawe in forum The Cafe
    Replies: 12
    Last Post: December 29th, 2011, 08:07 AM
  3. How to convert local path drive to UNC path
    By krisswift in forum Object Oriented Programming
    Replies: 2
    Last Post: November 17th, 2011, 08:40 AM
  4. Relative path issue with Context path struts
    By chinnu in forum Web Frameworks
    Replies: 1
    Last Post: March 31st, 2011, 10:17 AM
  5. how to get full path name from realtive path
    By priyanka3006 in forum File I/O & Other I/O Streams
    Replies: 8
    Last Post: August 10th, 2009, 04:28 AM

Tags for this Thread