Results 1 to 4 of 4
  1. #1
    edenJava is offline Member
    Join Date
    Jul 2011
    Location
    New York, NY
    Posts
    2
    Rep Power
    0

    Default Trouble Installing JDK in Windows 7

    Dear Comrades,

    Once upon a time I owned computers which had the Windows 2000 and Windows XP operating systems. Today, any new PC computer you purchase will have the Windows 7 OS, 64 bit. And installing the JDK and getting it to run on this operating system is as tough as getting Democrats and Republicans to work together!

    I have installed and re-installed the JDK to no avail. I have changed the system PATH and still the only thing that happens is a brief flicker of the DOS window, then "nothing". I have extensively searched the Internet through Google for articles or something, somewhere where someone else had the same problem and can't find an answer. I have checked the Oracle website for a solution and their limited documentation does not tell anyone how to resolve this issue. (Much of it is also so extensive and confusing that it's a bit like reading the entire bible, just to find the word: "fornication"). I've even called the support phone number Oracle's website and spoke to a technician who was dumbfounded and told me to ask someone over at the Java.com site. Yet the Java.com website only refers to all of the older Windows operating systems. (Back to square 1).

    Does anyone have a clear and concise method for getting the JDK/JRE up and running on a Windows 7 operating system? Please help. Amen! lol...

    Last edited by edenJava; 07-02-2011 at 01:04 AM.

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    The video I have linked works for me with windows 7 64 bit. Would you mind explaining exactly what you did after setting up the path?

    The video shows you downloading the jdk, if you go to this link: Java SE Development Kit 6u26 you will be provided with a download for many systems. Download the correct one(this downloads the JDK SE 6 update 26.

    After this you need to point to the folder containing javac. The video shows you how to do this, but you basically navigate your way to the correct folder(the one containing javac), then right click and go to properties, then get the link, and set the path to point to it.

    This should have everything working for you.

    Next open a text editor and type the following

    Java Code:
    public class Hello{
      public static void main(String[] args){
        System.out.println("Hello, world!");
      }
    }
    Save the file as Hello.java (the file name( minus the .java) should match the class name EXACTLY).

    Next open the command line(start -> run -> cmd), and navigate to the containing folder of this new Hello.java file(it would be helpful to create a new folder for java src, something on your desktop, or wherever you want it which is easy to navigate to, I store mine in C:/JavaCode)

    Once in the correct directory, trype

    Java Code:
    javac Hello.java
    This should compile the .java file into a .class file, finally type

    Java Code:
    java Hello
    And you should see "Hello, world!" printed in the cmd line window.

  3. #3
    samanyu is offline Member
    Join Date
    Jun 2011
    Location
    Tsukuba, Japan
    Posts
    63
    Rep Power
    0

    Default

    If you set your PATH to C:\Program Files\Java\jdk1.6.0_26\bin ie. go to where your JDK is installed, right click on the first file inside the bin folder, choose properties and copy the location.
    and your CLASSPATH to .;%JAVA_HOME%
    it should work ok.

    worked for me :)

  4. #4
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    Oh ya, if you don't set your class path, you will probably have to compile with

    Java Code:
    javac -cp . filename.java
    If you set your CLASSPATH as samanyu said you won't need to use the -cp flag(although some think it's better to use it)

Similar Threads

  1. Trouble installing JAVA
    By ranjiths in forum New To Java
    Replies: 3
    Last Post: 05-07-2011, 03:14 PM
  2. Replies: 2
    Last Post: 03-19-2011, 05:46 PM
  3. Replies: 8
    Last Post: 09-10-2010, 09:22 PM
  4. Replies: 15
    Last Post: 09-18-2009, 08:45 AM
  5. HELP installing JDK please!
    By trucutru in forum New To Java
    Replies: 9
    Last Post: 01-17-2009, 06:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •