5 Replies - 4982 Views - Last Post: 10 August 2012 - 02:16 PM Rate Topic: -----

#1 Zero Cool   User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 100
  • Joined: 18-June 12

The Dreaded 'javac' is not recognized DUN DUN DUN

Posted 10 August 2012 - 11:59 AM

Ok, I'm not sure if this is the right category for this question, so mods feel free to move this thread (and sorry, if so).

I am starting my journey into Java (after getting my feet wet with some C++) and I can NOT get anything to compile.

I am using Windows XP. I have downloaded Java SE Development Kit 7u5 from Oracle's web site (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1637583.html). Next, I installed and had no issues.

Then, I went to Settings\Control Panel\System\Advanced\Environment Variables\ and changed the Path to include ;C:\Program Files\Oracle\JavaFX 2.1 SDK\bin. This is where my javac.exe is supposed to be located, as I understand it.

However, when I try to run the command line and compile my code, I still get "'javac' is not recognized as an internal or external command, operable program or batch file."

When I type c:\>Path, the shell returns:

Microsoft Windows XP [Version 5.1.2600]
© Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\S&T>path
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\Mi
crosoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS
\Binn\;c:\Program Files\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Fil
es\Oracle\JavaFX 2.1 SDK\bin

C:\Documents and Settings\S&T>

From what I read on OS and a couple other forums I hadn't heard of (I googled the snot out this question a few times now), what I'm doing should compile my code. Any help from any other folks that compile Java in Windows XP?

Is This A Good Question/Topic? 0
  • +

Replies To: The Dreaded 'javac' is not recognized DUN DUN DUN

#2 CasiOo   User is offline

  • D.I.C Lover
  • member icon

Reputation: 1578
  • View blog
  • Posts: 3,551
  • Joined: 05-April 11

Re: The Dreaded 'javac' is not recognized DUN DUN DUN

Posted 10 August 2012 - 12:06 PM

Uhm have you install java fx instead of the normal development kit?

The path should look something like C:\Program Files\Java\jdk1.7.0_01\bin
Was This Post Helpful? 1
  • +
  • -

#3 SwiftStriker00   User is offline

  • No idea why my code works
  • member icon

Reputation: 440
  • View blog
  • Posts: 1,618
  • Joined: 25-December 08

Re: The Dreaded 'javac' is not recognized DUN DUN DUN

Posted 10 August 2012 - 12:08 PM

You need to make sure the URL you are putting into your path variable leads to the directory that contains avafx.sh and javafx.bat.

I think the path you want is
C:\Program Files\Oracle\JavaFX 2.1 SDK\javafx\trunk\bin


javac.exe would be for the normal java sdk, which I think is different, but i'll let someone who has worked with FX to correct me on that one.

This post has been edited by SwiftStriker00: 10 August 2012 - 12:08 PM

Was This Post Helpful? 1
  • +
  • -

#4 farrell2k   User is offline

  • D.I.C Lover
  • member icon

Reputation: 874
  • View blog
  • Posts: 2,706
  • Joined: 29-July 11

Re: The Dreaded 'javac' is not recognized DUN DUN DUN

Posted 10 August 2012 - 12:10 PM

The Java installer does not add Java to the windows path. It is ot present in the pacth you posted. You'll have to do it manually.
Was This Post Helpful? 0
  • +
  • -

#5 Zero Cool   User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 100
  • Joined: 18-June 12

Re: The Dreaded 'javac' is not recognized DUN DUN DUN

Posted 10 August 2012 - 12:49 PM

View PostSwiftStriker00, on 10 August 2012 - 07:08 PM, said:

You need to make sure the URL you are putting into your path variable leads to the directory that contains avafx.sh and javafx.bat.

I think the path you want is
C:\Program Files\Oracle\JavaFX 2.1 SDK\javafx\trunk\bin


javac.exe would be for the normal java sdk, which I think is different, but i'll let someone who has worked with FX to correct me on that one.


This seems like the most helpful input yet. It seems like I must have the environment variable file path wrong. However, when I do a search for javafx.bat on that drive I return 0 results.

Can anyone help me with the file name I should be searching for?

I also tried C:\Program Files\Oracle\JavaFX 2.1 Runtime\bin, which seemed pretty promising because I was able to find an application called javacpl in there.
Was This Post Helpful? 0
  • +
  • -

#6 Zero Cool   User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 100
  • Joined: 18-June 12

Re: The Dreaded 'javac' is not recognized DUN DUN DUN

Posted 10 August 2012 - 02:16 PM

View PostCasiOo, on 10 August 2012 - 07:06 PM, said:

Uhm have you install java fx instead of the normal development kit?

The path should look something like C:\Program Files\Java\jdk1.7.0_01\bin


Eureka! This was pretty much right. My version was C:\Program Files\Java\jdk1.7.0_01\bin.

Just in case anyone else runs across this problem and needs help.

CasiOo, you rock!

One those times I wish I could click the green button 25 times
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1