Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 12 of 12

Thread: Trouble with the JDK

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Trouble with the JDK

    I've installed the JDK, but I can't figure out how to compile a document with it. There seems to be no screen in which I could type text. Neither do I know where the compile button is. Please help!


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,482
    My Mood
    Mellow
    Thanks
    151
    Thanked 609 Times in 596 Posts

    Default Re: Trouble with the JDK

    The JDK by itself includes command line tools to compile programs but does not include a source code editor or Integrated Development Environment. You can find java helloworld tutorials that will step you through creating a source file in the editor of your choice and running it from the command line or using the IDE of your choice. Do some more reading, decide which approach you'll follow, and come back if you need more help.

  3. #3
    Junior Member
    Join Date
    Oct 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Trouble with the JDK

    Thank you very much for your help. I was frustrated because I have been trying to download and use this software for a couple of days now. I would like to use the Java VM, but I find that there is no "bin" folder in my installation path, which, I believe, is necessary to run the compiler. All I have in the path folder is a 'demo' folder, a 'sample' folder, and a release file. Would you please assist again?

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,482
    My Mood
    Mellow
    Thanks
    151
    Thanked 609 Times in 596 Posts

    Default Re: Trouble with the JDK

    Which OS are you using? Windows (version?), some version of Linux? Something else?

    If you open a command prompt and type the command

    javac -version

    what happens (copy and paste result)?

    For example, on my computer I get:
    [greg:~:18:47]$ javac -version
    javac 1.7.0_40
    [greg:~:18:50]$
    You may get an error, but that's okay.

  5. The Following User Says Thank You to GregBrannon For This Useful Post:

    sambaguy (October 3rd, 2013)

  6. #5
    Junior Member
    Join Date
    Oct 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Trouble with the JDK

    It doesn't recognize javac as a command. The version is the latest, 1.7.0_40. So, maybe I didn't completely install it? But it told me that I had, about 7 times.

  7. #6
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,482
    My Mood
    Mellow
    Thanks
    151
    Thanked 609 Times in 596 Posts

    Default Re: Trouble with the JDK

    You may be installing the JRE rather than the Java SDK. To install the SDK, you should have to agree to a license or usage agreement (forget what it's called), but it is not required for the JRE. Since you didn't answer my other questions, it's difficult to be more helpful or to attract those who can offer the most help.

    If you are installing the SDK, then you may have to correctly set the path and/or the CLASSPATH environment variable. There are many tutorials on doing this, but it's probably best to start with those given on the Oracle installation pages. Don't give up. It's really not that hard.

  8. #7
    Junior Member
    Join Date
    Oct 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Trouble with the JDK

    Oops, sorry, I'm using Windows XP, version 2002.

    --- Update ---

    I've had a window open repeatedly that says that I successfully installed "Java SE Development Kit 7 update 40".

    Thank you again.

  9. #8
    Junior Member
    Join Date
    Oct 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Trouble with the JDK

    Please excuse, but it is just the same. Still no "bin" directory.

  10. #9
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,482
    My Mood
    Mellow
    Thanks
    151
    Thanked 609 Times in 596 Posts

    Default Re: Trouble with the JDK

    This is what we know:

    Windows XP, 2002
    Reportedly successful install of JDK (multiple times)
    Still no "bin" directory

    What we don't know:
    What "Still no "bin" directory" means.

    In post #3, you stated, "I find that there is no "bin" folder in my installation path." Is that what you're also reporting in post #8? And if so, what do you mean by that? Are you saying there is absolutely no /bin directory on your computer anywhere? Or are you saying that a /bin entry doesn't appear in your PATH environment variable?

    You should review this whole page, perhaps focusing on the Troubleshooting section.

    Again, this isn't that hard, but I understand your frustration. Be mad at the dirt. Please be as specific as possible when you tell us what you're seeing at your end, remembering that we see only what you tell us. Everything else is guesswork, ESP, or supposition/assumption, and those don't always work that well. And when we ask a question, follow our instructions and answer them directly and with the detail requested.

  11. #10
    Junior Member
    Join Date
    Oct 2013
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: Trouble with the JDK

    I am very stupid. I searched the hard drive for bin folders and found one in another path labled "jdk1.7.0_40" in which I had earlier installed the software. I had had no 'bin' folder in the original folder jdk1.7.0_40. That is what I meant to report in posts #3 and #8.

    I did review the page to which you linked.
    I still don't know which program in \bin to summon to start the compiler. It isn't for having failed to look around. It could just be me, but perhaps Oracle didn't package its documentation perfectly.

  12. #11
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,482
    My Mood
    Mellow
    Thanks
    151
    Thanked 609 Times in 596 Posts

    Default Re: Trouble with the JDK

    Your first paragraph makes little to no sense to me, except it sounds like you have (or had?) a /bin folder somewhere on your harddrive, and it has something to do with a Java installation.

    The command to start the compiler is

    javac SourceCodeName.java

    You should find 'javac.exe' in the /bin folder. That's why I asked you to try what you did (I think) in post #4. Fix your PATH environment variable to include the /bin folder that you've found. These beginning basics are documented in basic tutorials in varying degrees of detail. I also mentioned those in post #2.

  13. #12
    Junior Member
    Join Date
    Oct 2013
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Trouble with the JDK

    if you installed the jdk sucessfully then the only thing is left is to set the environment variable.

Similar Threads

  1. Detect if JDK is installed?
    By sci4me in forum Java Theory & Questions
    Replies: 1
    Last Post: August 7th, 2013, 11:23 AM
  2. Can I use J Grasp instead of JDK 7?
    By mikef1965 in forum Java IDEs
    Replies: 1
    Last Post: June 2nd, 2013, 06:11 PM
  3. BlueJ trouble or program trouble (Combining Arraylists)
    By star12345645 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: March 11th, 2012, 12:15 PM
  4. JDK + Netbeans for XP Home
    By djl1990 in forum Java IDEs
    Replies: 1
    Last Post: March 5th, 2012, 01:48 PM
  5. Downloading help with JDK 6
    By oneofthelions in forum Java Theory & Questions
    Replies: 1
    Last Post: December 13th, 2009, 06:36 AM