Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #34879 > unrolled thread
| Started by | solitary.wanderer52@gmail.com |
|---|---|
| First post | 2016-07-13 16:52 -0700 |
| Last post | 2016-07-20 12:45 -0700 |
| Articles | 19 — 7 participants |
Back to article view | Back to comp.lang.java.programmer
Missing javac solitary.wanderer52@gmail.com - 2016-07-13 16:52 -0700
Re: Missing javac Arne Vajhøj <arne@vajhoej.dk> - 2016-07-13 21:28 -0400
Re: Missing javac Lew <lewbloch@gmail.com> - 2016-07-13 22:21 -0700
Re: Missing javac Eric Sosman <esosman@comcast-dot-net.invalid> - 2016-07-14 07:54 -0400
Missing javac Steve Graham <solitary.wanderer52@gmail.com> - 2016-07-14 11:03 -0700
Re: Missing javac Arne Vajhøj <arne@vajhoej.dk> - 2016-07-14 14:50 -0400
Re: Missing javac Hiram Hunt <hiramhunt@verizon.net> - 2016-07-14 15:21 -0400
Re: Missing javac Arne Vajhøj <arne@vajhoej.dk> - 2016-07-14 16:30 -0400
Re: Missing javac Steve Graham <solitary.wanderer52@gmail.com> - 2016-07-14 13:04 -0700
Re: Missing javac Arne Vajhøj <arne@vajhoej.dk> - 2016-07-14 16:27 -0400
Re: Missing javac Arne Vajhøj <arne@vajhoej.dk> - 2016-07-14 16:32 -0400
Re: Missing javac Steve Graham <solitary.wanderer52@gmail.com> - 2016-07-14 14:40 -0700
Re: Missing javac Lew <lewbloch@gmail.com> - 2016-07-14 15:09 -0700
Re: Missing javac Arne Vajhøj <arne@vajhoej.dk> - 2016-07-14 18:33 -0400
Re: Missing javac Steve Graham <solitary.wanderer52@gmail.com> - 2016-07-14 16:26 -0700
Re: Missing javac Arne Vajhøj <arne@vajhoej.dk> - 2016-07-14 18:36 -0400
Re: Missing javac Steve Graham <solitary.wanderer52@gmail.com> - 2016-07-14 16:26 -0700
Re: Missing javac Roedy Green <inquiry@mindprod.com> - 2016-07-20 06:18 -0700
Re: Missing javac Steve Graham <solitary.wanderer52@gmail.com> - 2016-07-20 12:45 -0700
| From | solitary.wanderer52@gmail.com |
|---|---|
| Date | 2016-07-13 16:52 -0700 |
| Subject | Missing javac |
| Message-ID | <aa7c01d2-19eb-4e13-b45b-de3c76a11475@googlegroups.com> |
Just downloaded NetBeans/Java SDK to a Windows 10 Home x64 machine. NetBeans seems to work fine, as well as Java itself. However, typing javac at the command line returns a missing command error. I find javac on the disk, just not where the where command indicates java is. I can create a symlink for it in that directory, however it just creates other problems, and is probably not the ultimate solution. Suggestion on how to resolve this would be appreciated. TIA, Steve
[toc] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-07-13 21:28 -0400 |
| Message-ID | <nm6pr1$1id1$1@gioia.aioe.org> |
| In reply to | #34879 |
On 7/13/2016 7:52 PM, solitary.wanderer52@gmail.com wrote: > Just downloaded NetBeans/Java SDK to a Windows 10 Home x64 machine. > NetBeans seems to work fine, as well as Java itself. However, typing > javac at the command line returns a missing command error. I find > javac on the disk, just not where the where command indicates java > is. I can create a symlink for it in that directory, however it just > creates other problems, and is probably not the ultimate solution. Where is it and where should it be? Arne
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2016-07-13 22:21 -0700 |
| Message-ID | <c3cd14de-c3b4-4bf9-837a-d5b184102bef@googlegroups.com> |
| In reply to | #34880 |
Arne Vajhøj wrote:
> solitary.wanderer52 wrote:
> > Just downloaded NetBeans/Java SDK to a Windows 10 Home x64 machine.
> > NetBeans seems to work fine, as well as Java itself. However, typing
> > javac at the command line returns a missing command error. I find
> > javac on the disk, just not where the where command indicates java
> > is. I can create a symlink for it in that directory, however it just
> > creates other problems, and is probably not the ultimate solution.
The simplest solution likely to work is to reinstall the latest JDK (not JRE) from Oracle. It is possible the file got lost, or that you never downloaded the JDK.
> Where is it and where should it be?
When you need help from a technical forum, the more relevant detail you provide the more likely you are to get a useful answer. "returns a missing command error" is syntactically ambiguous and doesn't give us the information that the error message gave you. How can we diagnose the error if you withhold that particularly vital item? What symlink? What directory? What other problems?
Regardless of all that, most such problems with the JDK are best solved by a quick installation from the Oracle site. The installations generally are not very painful. Symlinks are only useful if you link to a known good installation.
For the JDK, symlinking individual files is a bad idea. Are you quite sure you linked the right file? What do "java -version" and "javac -version" tell you respectively? The usual practice is to symlink to the correct JAVA_HOME directory (the parent of the "bin" directory) and include "${JAVA_HOME}/bin" in your PATH.
Anyway, first thing is to reinstall the latest JDK and see what happens.
--
Lew
[toc] | [prev] | [next] | [standalone]
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2016-07-14 07:54 -0400 |
| Message-ID | <nm7uh9$eaa$1@dont-email.me> |
| In reply to | #34879 |
On 7/13/2016 7:52 PM, solitary.wanderer52@gmail.com wrote:
> Just downloaded NetBeans/Java SDK to a Windows 10 Home x64 machine. NetBeans seems to work fine, as well as Java itself. However, typing javac at the command line returns a missing command error. I find javac on the disk, just not where the where command indicates java is. I can create a symlink for it in that directory, however it just creates other problems, and is probably not the ultimate solution.
"Missing command error" is new to me, but I suspect your PATH
variable doesn't include the Java directories. Here's what I do,
at the Windows command prompt:
path %path%;"\Program Files\Java\jdk1.8.0_91\bin"
(If your JDK is located elsewhere or if you're using a different
version, make the obvious edits.)
--
esosman@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM
[toc] | [prev] | [next] | [standalone]
| From | Steve Graham <solitary.wanderer52@gmail.com> |
|---|---|
| Date | 2016-07-14 11:03 -0700 |
| Message-ID | <dea4ae46-b6ae-411e-b300-6555e830048f@googlegroups.com> |
| In reply to | #34879 |
Thank you for your comments and suggestions. Here is more information along the lines suggested.
My system is Windows 10 64-bit
I have removed and re-installed the NetBeans/Java 8 SDK and the following is from after the re-install
C:\Users\Me>javac
'javac' is not recognized as an internal or external command, operable program or batch file.
C:\Users\Me>where java
C:\ProgramData\Oracle\Java\javapath\java.exe
C:\Users\Me>where javac
INFO: Could not find files for the given pattern(s).
C:\Users\Me>path
PATH=
C:\ProgramData\Oracle\Java\javapath;
C:\Program Files (x86)\Intel\iCLS Client\;
C:\Program Files\Intel\iCLS Client\;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files\ActivIdentity\ActivClient\;
C:\Program Files (x86)\ActivIdentity\ActivClient\;
C:\Program Files\Intel\WiFi\bin\;
C:\Program Files\Common Files\Intel\WirelessCommon\;
C:\HashiCorp\Vagrant\bin;
C:\Program Files\Git\cmd
C:\Users\Me>dir C:\ProgramData\Oracle\Java\javapath
Volume in drive C is OS
Volume Serial Number is 46DB-B9AD
Directory of C:\ProgramData\Oracle\Java\javapath
07/13/2016 10:56 AM <DIR> .
07/13/2016 10:56 AM <DIR> ..
07/13/2016 10:56 AM <SYMLINK> java.exe [C:\Program Files\Java\jre1.8.0_91\bin\java.exe]
07/13/2016 10:56 AM <SYMLINK> javaw.exe [C:\Program Files\Java\jre1.8.0_91\bin\javaw.exe]
07/13/2016 10:56 AM <SYMLINK> javaws.exe [C:\Program Files\Java\jre1.8.0_91\bin\javaws.exe]
3 File(s) 0 bytes
2 Dir(s) 193,201,717,248 bytes free
C:\Users\Me>
When I search for java.exe, I find it in the following directories:
C:\ProgramData\Oracle\Java\javapath (Type: .symlink here, all others are Application)
C:\Program Files\Java\jre1.8.0_91\bin
C:\Program Files\Java\jdk1.8.0_91\jre\bin
C:\Program Files\Java\jdk1.8.0_91\bin
When I search for javac.exe, I find it in the following directories:
C:\Program Files\Java\jdk1.8.0_91\bin Type: Application)
Thanks again for your help.
Steve
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-07-14 14:50 -0400 |
| Message-ID | <nm8muh$9u0$1@gioia.aioe.org> |
| In reply to | #34887 |
On 7/14/2016 2:03 PM, Steve Graham wrote: > Thank you for your comments and suggestions. Here is more information along the lines suggested. > > My system is Windows 10 64-bit > > I have removed and re-installed the NetBeans/Java 8 SDK and the following is from after the re-install > > C:\Users\Me>javac > 'javac' is not recognized as an internal or external command, operable program or batch file. > C:\Users\Me>dir C:\ProgramData\Oracle\Java\javapath > Volume in drive C is OS > Volume Serial Number is 46DB-B9AD > > Directory of C:\ProgramData\Oracle\Java\javapath > > 07/13/2016 10:56 AM <DIR> . > 07/13/2016 10:56 AM <DIR> .. > 07/13/2016 10:56 AM <SYMLINK> java.exe [C:\Program Files\Java\jre1.8.0_91\bin\java.exe] > 07/13/2016 10:56 AM <SYMLINK> javaw.exe [C:\Program Files\Java\jre1.8.0_91\bin\javaw.exe] > 07/13/2016 10:56 AM <SYMLINK> javaws.exe [C:\Program Files\Java\jre1.8.0_91\bin\javaws.exe] > 3 File(s) 0 bytes > 2 Dir(s) 193,201,717,248 bytes free > > C:\Users\Me> > > When I search for java.exe, I find it in the following directories: > C:\ProgramData\Oracle\Java\javapath (Type: .symlink here, all others are Application) > C:\Program Files\Java\jre1.8.0_91\bin > C:\Program Files\Java\jdk1.8.0_91\jre\bin > C:\Program Files\Java\jdk1.8.0_91\bin > > When I search for javac.exe, I find it in the following directories: > C:\Program Files\Java\jdk1.8.0_91\bin Type: Application) Adding C:\Program Files\Java\jdk1.8.0_91\bin to PATH should certainly make things work. I have never seen that SYMLINK before, but then I am not on Windows 10 yest, so ... Arne
[toc] | [prev] | [next] | [standalone]
| From | Hiram Hunt <hiramhunt@verizon.net> |
|---|---|
| Date | 2016-07-14 15:21 -0400 |
| Message-ID | <5787e63e$0$53493$c3e8da3$b1356c67@news.astraweb.com> |
| In reply to | #34888 |
On 7/14/2016 2:50 PM, Arne Vajhøj wrote: > On 7/14/2016 2:03 PM, Steve Graham wrote: >> .... >> When I search for java.exe, I find it in the following directories: >> C:\ProgramData\Oracle\Java\javapath (Type: .symlink here, all others >> are Application) >> .... > > .... > > I have never seen that SYMLINK before, but then I am not on Windows 10 > yest, so ... > It has existed on my Windows 7 machine for at least a few recent Java 8 versions.
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-07-14 16:30 -0400 |
| Message-ID | <nm8spc$js0$1@gioia.aioe.org> |
| In reply to | #34889 |
On 7/14/2016 3:21 PM, Hiram Hunt wrote: > On 7/14/2016 2:50 PM, Arne Vajhøj wrote: >> On 7/14/2016 2:03 PM, Steve Graham wrote: >>> .... >>> When I search for java.exe, I find it in the following directories: >>> C:\ProgramData\Oracle\Java\javapath (Type: .symlink here, all others >>> are Application) >>> .... >> >> .... >> >> I have never seen that SYMLINK before, but then I am not on Windows 10 >> yest, so ... >> > It has existed on my Windows 7 machine for at least a few recent > Java 8 versions. I just checked - it is on my W7 as well - never noticed them before. Arne
[toc] | [prev] | [next] | [standalone]
| From | Steve Graham <solitary.wanderer52@gmail.com> |
|---|---|
| Date | 2016-07-14 13:04 -0700 |
| Message-ID | <c39cf69f-3f8d-4219-a189-7efe80dcbefe@googlegroups.com> |
| In reply to | #34888 |
Thanks, Arne. Should this be reported to Oracle?
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-07-14 16:27 -0400 |
| Message-ID | <nm8sju$jlb$1@gioia.aioe.org> |
| In reply to | #34890 |
On 7/14/2016 4:04 PM, Steve Graham wrote: > Thanks, Arne. Should this be reported to Oracle? Not necessarily. The logic may be that: - for running Java apps they want to make it very easy to always use latest Java - for developing Java they expect the developer to manually pick the version they want to use Or it may not be. Arne
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-07-14 16:32 -0400 |
| Message-ID | <nm8ssg$js0$2@gioia.aioe.org> |
| In reply to | #34888 |
On 7/14/2016 2:50 PM, Arne Vajhøj wrote: > Adding C:\Program Files\Java\jdk1.8.0_91\bin to PATH should certainly > make things work. Probably better: Set JAVA_HOME to C:\Program Files\Java\jdk1.8.0_91 and add %JAVA_HOME%\bin to PATH. One never know when some Java application want to use JAVA_HOME. :-) Arne
[toc] | [prev] | [next] | [standalone]
| From | Steve Graham <solitary.wanderer52@gmail.com> |
|---|---|
| Date | 2016-07-14 14:40 -0700 |
| Message-ID | <93bbd3d7-9b1a-44f5-9a2d-7bc0074dc8df@googlegroups.com> |
| In reply to | #34893 |
After adding this, javac worked and NetBeans still worked! Thanks, Arne! So you don't think I should report this? Why? Steve
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2016-07-14 15:09 -0700 |
| Message-ID | <bb1a21f1-e125-4d9e-b9ed-b82b3f8f6de0@googlegroups.com> |
| In reply to | #34894 |
On Thursday, July 14, 2016 at 2:40:27 PM UTC-7, Steve Graham wrote: > After adding this, javac worked and NetBeans still worked! > > Thanks, Arne! > > So you don't think I should report this? Why? Because it was your error, not theirs. "C:\Program Files\Java\jre1.8.0_91" is not the JDK. IF that was your default Java installation, it did not include "javac". You need to configure your system to use the JDK, not the JRE. You kept talking about installing the "NetBeans/Java 8 SDK". Your problem was not with NetBeans, it was with Java. You should be installing Java from the Oracle site. -- Lew
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-07-14 18:33 -0400 |
| Message-ID | <nm93vs$uoj$1@gioia.aioe.org> |
| In reply to | #34895 |
On 7/14/2016 6:09 PM, Lew wrote: > On Thursday, July 14, 2016 at 2:40:27 PM UTC-7, Steve Graham wrote: >> So you don't think I should report this? Why? > > Because it was your error, not theirs. > > "C:\Program Files\Java\jre1.8.0_91" is not the JDK. IF that was your > default Java installation, it did not include "javac". You need to > configure your system to use the JDK, not the JRE. > > You kept talking about installing the "NetBeans/Java 8 SDK". Your > problem was not with NetBeans, it was with Java. You should be > installing Java from the Oracle site. He had: C:\Program Files\Java\jdk1.8.0_91\jre\bin C:\Program Files\Java\jdk1.8.0_91\bin so it was installed. Just not in PATH. Arne
[toc] | [prev] | [next] | [standalone]
| From | Steve Graham <solitary.wanderer52@gmail.com> |
|---|---|
| Date | 2016-07-14 16:26 -0700 |
| Message-ID | <9e80e238-3a57-4489-9fc7-904de18a64ea@googlegroups.com> |
| In reply to | #34895 |
From the Oracle site, I downloaded NetBeans, which included JDK 8.
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2016-07-14 18:36 -0400 |
| Message-ID | <nm945d$v88$1@gioia.aioe.org> |
| In reply to | #34894 |
On 7/14/2016 5:40 PM, Steve Graham wrote: > So you don't think I should report this? Why? I am not convinced that it is an error. They may very well have wanted developers to set that version specific PATH. Developers are expected to be more knowledgeable than normal users. And a good portion of developers have multiple versions of JDK installed and will want to control which to use manually always. Arne
[toc] | [prev] | [next] | [standalone]
| From | Steve Graham <solitary.wanderer52@gmail.com> |
|---|---|
| Date | 2016-07-14 16:26 -0700 |
| Message-ID | <d8826e78-67d5-42c1-85ba-9e1fbcc9c9f6@googlegroups.com> |
| In reply to | #34897 |
Thanks.
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <inquiry@mindprod.com> |
|---|---|
| Date | 2016-07-20 06:18 -0700 |
| Message-ID | <3euuobp3om5e2guicjo3fgvrjqsfg0gghn@4ax.com> |
| In reply to | #34879 |
On Wed, 13 Jul 2016 16:52:16 -0700 (PDT), solitary.wanderer52@gmail.com wrote: > I find javac on the disk, = >just not where the where command indicates java is. put the your equivalent of J:\Program Files\Java\jdk1.8.0_102\bin on the path. also set up JAVA_HOME=J:\Program Files\java\jdk1.8.0_102
[toc] | [prev] | [next] | [standalone]
| From | Steve Graham <solitary.wanderer52@gmail.com> |
|---|---|
| Date | 2016-07-20 12:45 -0700 |
| Message-ID | <9981fd35-f843-4d2a-8836-169154c494da@googlegroups.com> |
| In reply to | #35008 |
On Wednesday, July 20, 2016 at 6:19:07 AM UTC-7, Roedy Green wrote: > On Wed, 13 Jul 2016 16:52:16 -0700 (PDT), > xxxx wrote: > > > I find javac on the disk, = > >just not where the where command indicates java is. > > put the your equivalent of > J:\Program Files\Java\jdk1.8.0_102\bin > on the path. > also set up > JAVA_HOME=J:\Program Files\java\jdk1.8.0_102 Thanks, Roedy. BTW, first read of you in regards to Abundance. That was a while ago :-) Steve
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web