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!
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.
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!
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.
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?
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:
You may get an error, but that's okay.[greg:~:18:47]$ javac -version javac 1.7.0_40 [greg:~:18:50]$
sambaguy (October 3rd, 2013)
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.
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.
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.
Please excuse, but it is just the same. Still no "bin" directory.
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.
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.
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.
if you installed the jdk sucessfully then the only thing is left is to set the environment variable.