0

I have a problem when compiling my code from Notepad++ when i compile example( javac StudentApp.java). It does not compile but instead i get this error code - "is not recognised as an internal or external command operable program or batch file". I use Windows 8 - well 8.1 now. This is my path:

C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;append

If anyone could help I would greatly appreciate it. Thanks.

5
  • 3
    You have installed Oracle JDK, haven't you? Commented Oct 20, 2013 at 20:49
  • I have but im not sure if i have installed the correct one tho which one should I have installed (Just checking) Commented Oct 20, 2013 at 20:54
  • 2
    I do not see bin directory of JDK in your path. Commented Oct 20, 2013 at 21:21
  • How could i modify it to put it in? Commented Oct 20, 2013 at 21:31
  • Sorry if i look really stupid here i'm just unfamiliar with knowledge of the Path file and all. And i'm really lost here and still clueless as to why its not working for me. Commented Oct 20, 2013 at 21:49

2 Answers 2

2

First be sure you have installed JDK , but not the JRE (jre comes without the javac).

Here's how you can the JAVA_HOME\bin to your path (in case you have installed JDK):

for /f  "delims=" %j in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit\1.6" /v JavaHome') do @set jreg=%j
set jreg=%jreg:    JavaHome    REG_SZ    =%
setx PATH "%jreg%\bin";%PATH%
Sign up to request clarification or add additional context in comments.

Comments

1

Thanks everyone i got my solution i left out the bin directory which was " C:\Program Files (x86)\Java\jdk1.7.0_45\bin;" at the start of my path. Hope this helps anyone else with the same problem.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.