• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Trouble installing JDK 7

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I just began learning java one week ago. I cannot properly install the jdk 7 (64-bit) on my windows7 64-bit computer. Should I try to install the jdk 6?
 
Bartender
Posts: 3225
34
IntelliJ IDE Oracle Spring Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tamar Osher wrote:Hi. I just began learning java one week ago. I cannot properly install the jdk 7 (64-bit) on my windows7 64-bit computer. Should I try to install the jdk 6?



What is the issue you are facing?
 
Marshal
Posts: 79968
396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

We have an FAQ which will probably help.
 
Tamar Osher
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I started learning Java almost 2 weeks ago. For more than a week, I have tried constantly to install the jdk 7 64-bit on my windows7 64-bit new computer. I have uninstalled, reinstalled, and restarted my computer repeatedly. I have read and done, repeatedly, all the info on all the java websites, including code ranch. I have also tried installing the 32-bit and the jdk 6, and I get the same results: The installation is quick and easy, but after that, NOTHING happens. There is nothing I can do with it, it does absolutely nothing. When I click on it, inside Control Panel, I get a pop-up saying something like, it is already installed, do you want to install it again? Otherwise, I get no response of any kind from the installed jdk. I get no error message. At the start menu, the jdk is not in my list of programs.

I also went to the you tube videos and did all their suggestions, and it did not help. I then tried to contact java/oracle by chat and email, but they have no response, and their websites do not mention this problem. I then contacted my computer company. The technicians suggested it was a microsoft windows7 software issue that was put into the windows7 operating system, and they will go into my computer's operating system and fix it, so that my computer will properly install java jdk. They said they are very familiar with it, and do it all the time for people, and I got 2 price quotes, $80 and $89. I then contacted Microsoft, asking them to fix it for free, and their technician said they would fix it for a price quote of over $100.


I then tried again, again using the info at CodeRanch, using the environmental variables info, with JAVA_HOME and Path, into system variables. But it still does not help. At this time, I don't know how to properly install the jdk myself, free of charge.

I request wise advice about what to do. Thanks for helping!
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, what exactly do you expect? The JDK does not come with some big GUI program. It's a bunch of command-line tools, that you can use from the Windows command prompt.

It sounds like you've installed the JDK correctly, but you expect to see some GUI program, which is not what the JDK is. There will be nothing visible in your Start menu after installing the JDK; that's normal.

Oracle's Hello World Tutorial shows you how to use the Java compiler from the Windows command line.
 
Tamar Osher
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I go to start, and type cmd, I get the black pop-up "command prompt". But after that, things don't work. When I type javac, I don't get the correct response. When I try to do the HelloWorld, and type cd C:\java, I don't get the correct response. What I get is a message saying not recognized as an internal or external command. I have repeatedly tried all sorts of ways to fix this, and nothing works. The only thing I get is the message about not recognized as a command. I don't know what to do to get it to work. Please advise. THANKS VERY MUCH!
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you have a look at the page Common Problems (and Their Solutions) that the Hello World tutorial contains?

Did you carefully follow the installation instructions for JDK 7 - especially Updating the PATH variable? Note that you need to close and re-open the command prompt after modifying the PATH (forgetting this is a common mistake that first-time JDK users make).
 
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you understand that you're not really giving us the information we need to help you? You are effectively saying "i can't get to St. Louis. HELP ME!!!" We don't know if you are in a car on a highway in Missouri, on a boat in the Atlantic ocean, or sitting at your computer in Sydney trying to buy a plane ticket.

When I try to do the HelloWorld, and type cd C:\java, I don't get the correct response.


What response DO you get? What response are you EXPECTING? I don't even know what you mean by "try to do the HelloWorld". Are you having problems writing the .java file? Saving it? Compiling it?

What I get is a message saying...


Paraphrasing a response doesn't help. Those error messages are VERY specific, and tell you exactly what the problem is. You don't go to a doctor and say "i'm sick". You say "I cut my finger off" or "I have a fever of 104F." What the doctor does is specific to the problem. Computer problems are even MORE so.

nothing works


SOMETHING works...you just haven't tried it and/or don't know what that is.

So please...make it easy for us to help you. Tell us ALL the information, ALL the details, what you EXPECT to happen, and what really does happen.
 
Tamar Osher
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At the black box, C:\windows\system32\cmd.exe,
when I type javac,
the response I get is
Javac is not recognized as an internal or external command, operable program, or batch file.

I have tried repeatedly to do and redo Path and JAVA_HOME in environmental variables, and I don't know what is wrong. I moved Path and JAVA_HOME to system variables, away from user variables, which was one of the online recommendations.

This is what both JAVA_HOME and Path are set at:
C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.7.0\bin

No matter what I try to do, the only response I get is
not recognized as an internal or external command, operable program, or batch file.

Please help.
 
Tamar Osher
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no problem typing or saving files. I am having difficulty with the java compiler.
 
Ranch Hand
Posts: 147
Eclipse IDE Tomcat Server Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tamar Osher wrote:
This is what both JAVA_HOME and Path are set at:
C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.7.0\bin



Your JAVA_HOME and PATH are two very different environmental variables. From what you've provided, your JAVA_HOME should be set to "C:\Program Files\Java\jdk1.7.0". Your JAVA_HOME should contain both the "bin" and "lib" folder needed to run & compile java programs. Your PATH needs to point to that "bin" folder where javac resides (which is what you have above).

If you still are getting the "javac is not recognized ..." message, try executing "echo %JAVA_HOME%" and "echo %PATH%" just to double-check it's actually pointing where you expect.
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
maybe you just dont understand how it works. to compile a file you first have to to change directories until you are at that directory. same goes for running.
 
Tamar Osher
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't yet understand how to compiler works, so I am not able to solve my problem. I don't understand the relationship between directories and compilers. Is there a website to visit to quickly figure this out?

Do I have two different JAVA_HOME, one for \bin and the other for \lib?

When I point to "bin", do I have \bin?

Please help. THANKS!
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First of all, you don't need to set JAVA_HOME. Java itself (the JDK) doesn't use this environment variable.

To solve the problem "javac is not recognized as an internal or external command", you need to add the bin directory of the JDK to the PATH environment variable, as is explained in the JDK installation instructions.

How exactly to change the PATH variable permanently depends on the version of Windows that you're using (it's slightly different for XP, Vista and Windows 7). You can easily find on the web how to set environment variables for your specific version of Windows.

If, for example, you have installed the JDK in C:\Java\jdk1.7.0_02 then you need to add the directory C:\Java\jdk1.7.0_02\bin to the PATH.
 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Small things to add -
1. Open a new cmd prompt (black box) window after setting the path variable.
2. Append the JDK bin path at the start of the path variable. E.g if your existing path is like -> %SystemRoot%\system32;... then add the jdk's path to the front like -> C:\Program Files\Java\jdk1.7\bin;%SystemRoot%\system32;...
 
Tamar Osher
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your help. However, I have already done those things. The \bin is there. I have done is so many times, so many ways, with the \bin, environmental variables, user variables, system variables, Path and JAVA_HOME, trying out all kinds of possible solutions. What can I do? Please help.
 
Tamar Osher
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At this point, I am ready and eager to pay someone to fix the situation, so that I can move forward.
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tamar Osher wrote:I have already done those things. The \bin is there. I have done is so many times, so many ways, with the \bin, environmental variables, user variables, system variables, Path and JAVA_HOME, trying out all kinds of possible solutions. What can I do? Please help.


If it still isn't working, then you must have done something wrong.

So let's do this with baby steps.

1. Open a command prompt window.
2. Type in this command: echo %PATH%
3. Copy the output and post it here.
4. Tell us in which directory you installed the JDK.
 
Tamar Osher
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
C:\Users\Tamar Internet>echo %PATH%
C:\WINDOWS\system 32;C:\WINDOWS;C:\Program Files\Java\jdk1.7.0\bin
C:\Users\Tamar Internet>

JDK installed in directory:
Description: jdk-7-windows-x64
Location: C:\Users\Tamar Internet\Java Folder

Thanks for helping. I look forward to hearing from you!
 
Jesper de Jong
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, so you added to the PATH: C:\Program Files\Java\jdk1.7.0\bin

But you installed the JDK in: C:\Users\Tamar Internet\Java Folder\jdk-7-windows-x64

Is that correct? Or is C:\Users\Tamar Internet\Java Folder\jdk-7-windows-x64.exe just where you saved the installer?

Did you actually run the installer? Do you indeed have a directory named C:\Program Files\Java\jdk1.7.0\bin on your harddisk?

If you really installed the JDK in a directory named C:\Users\Tamar Internet\Java Folder\jdk-7-windows-x64, then what you need to add to the PATH is: C:\Users\Tamar Internet\Java Folder\jdk-7-windows-x64\bin
and not C:\Program Files\Java\jdk1.7.0\bin
 
Tamar Osher
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JAVA_HOME is located in user variables, and Path is located in system variables.
Both JAVA_HOME and Path have this in them: C:\Users\Tamar Internet\Java Folder\jdk-7-windows-x64\bin
When I type javac, I get, not recognized as an external or internal command.

Just a moment ago, I finished chatting with a Java expert at LivePerson.com. He went inside my computer to search and fix, but he did not know what the problem was, and he said I needed to install the 32bit, saying the 64bit always has problems.
However, I previously installed the 32 bit, and I got the same results when typing javac, not recognized as an external or internal command. I have not yet installed the 32bit again, because I doubt that is my particular problem. What do you think?

Please advise. I am very eager to get it fixed.
 
fred rosenberger
lowercase baba
Posts: 13091
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what happens when you do this:

cd \Users\Tamar Internet\Java Folder\jdk-7-windows-x64\bin

If you get "The system cannot find the path specified." then that is NOT where you have the JDK installed.
if that works, do this:


java -version

If you get something like

C:\iig\tmp>java -version
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)

then we're getting close

your PATH variable basically holds a list of directories. When you type something on the command line, the OS uses that list to search for the program you are trying to run. If the program is not found in any of those directories, you get the "unrecognized command" error. So the problem is that the file "java.exe" is not actually in any of the directories listed in your PATH.

If all else fails, open a windows explorer window, and search for "java.exe". You may get several hits depending on what all has been installed on your PC, but if so, post what you find here.
 
Tamar Osher
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your expert help! It is fixed; I can type javac, and the get the correct response.

Your last post gave me ideas that I had not thought of, and on the second try, it worked. What I was not previously doing, was deleting both JAVA_HOME and Path, when I uninstalled and deleted the jdk.

This last try, I recorded the exact place jdk wanted to be installed, and I then added \bin to the new JAVA_HOME and Path. Then, I typed in javac and it was working.

THANK YOU!
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings, I was wondering if anyone could help me, I am having the same problem as Tamar Osher as in when I type javac MooseGreetings.java in command prompt I am continuously getting the error...

" 'javac' is not recognized as an internal or external command, operable program or batch file. "

yet when I type "java -version" I get the following....

java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)

So I assume my PATH and and JAVA_HOME values are correct.

I installed the 64bit JDK 7, and have yet to try the 32bit version so mabye that could be the problem. However I'm lost at this point.

As of right now I have JAVA_HOME in my user variables targeted to "C:\Program Files\Java\jdk1.7.0_02"

and Path in my system variables targeted to "C:\Program Files\Java\jdk1.7.0_02\bin;" in front of the default path as specified in the MooseGreetings tutorial here on coderanch.

Help would be much appreciated, I am new to programming in general, and am just trying to complete the MooseGreetings (Hello World) application.
 
John Judeth
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nevermind, I was trying to compile using javac without navigating to the directory where my java file is. It works now I succesfully got the "mooooo" message )))

Thanks anyway!
 
Campbell Ritchie
Marshal
Posts: 79968
396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

John Judeth wrote: . . . So I assume my PATH and and JAVA_HOME values are correct. . . . .

No, you are mistaken there. If you had to navigate to the folder where you put the MooseGreetings.java file, you must have put the .java file in ProgramFiles, which is the wrong place to put it. I recommend you create a java folder or similar and put all your work in that. Also check your PATH very carefully. Details in our FAQ.

You might find the PATH problem has sorted itself spontaneously. That is because you have opened a new command prompt; the environment variables are not recognised until you open a new command line.

[Edit]The PATH you showed in your post looks correct at a one-second glance[/edit]
 
John Judeth
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks! I'm glad I found coderanch, love the friendly yet expert community here. I look forward to learning.

And yes I believe I had the environment variables correct the whole time, I just was not insightful enough to realize I had to navigate to the folder in which my java file was located, I had thought I could just open command prompt, and instantly type javac MooseGreetings.java so I was assuming something was wrong with my variables when I got the javac error.

I went ahead and made a java folder for my work as suggested!

Thanks for the feedback!
 
Campbell Ritchie
Marshal
Posts: 79968
396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You’re welcome
 
Campbell Ritchie
Marshal
Posts: 79968
396
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Titu Jack,
Your post was moved to a new topic.
 
Sheriff
Posts: 28328
96
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chunchen Lin,
Your post was moved to a new topic.
 
Time is mother nature's way of keeping everything from happening at once. And this is a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic