Hello everyone. I am new to Java. I just started a computer science class in college and the textbook we are using is called, "Starting out with java From control structures through objects, 5th edition". I go to this part of the java site, http://www.oracle.com/technetwork/java/javase/downloads/index.html and download the winx64 version of Java SE Development Kit 7u7 after clicking I agree. The download works, I open the file and go through the steps. I wrote down where the file is saved "c:\Program Files\Java\jdk1.7.0_07\". Once that is finished it says everything is ok. I think I may be mistaken but do i need to download something else to be able to read/write java coding? I am only familiar with Python and it was very simple to download the program and just start coding. I've just had a really long day and am probably overlooking something. If it's not too much trouble, could somebody help me with steps. I just want to be able to type this HelloWorld stuff and get going. Also another question, since I am using Java, am I able to write something on a notepad program for example and jave it work? since java is different from python, I don't know. Thank you for your time.
No you donot need to download anything else.
just download both jdk and jre.
update the environment variables in your system.
write the simple hello world program in notepad.
save it as a .java file in the bin folder of jdk.
go to cmd.
go to the path where your jdk bin is.
it's usually C:\program files\java\jdk\bin
write "javac filename.java" to compile your file
write "java filename" to run your file.
you have downloaded jdk from oracle site which is java development kit. it contains all the tools required to write java program. but as you know for running java programs you require java runtime environment which is also refereed as JVM( java virtual machine). all java progrmas run within the realms of JVM. it is like an OS for java programs . you need to download jre also from the above link. once it is installed you can write and execute java programs.
yes you can write java programs in notepad or for that matter any text editor. infact for beginners that is the recommended way to learn java. start with simple text editor like notepad++ and then you can switch to an IDE.
P.S. you need to add you installation directory for e.g c://program files/java/jdk1.6.0_31/bin in your path variable.
you know what he is a beginner in java, and when i was a beginner i learned the same way and hence i told him to do so. this is not misleading advice.
and no offence, but i feel that people here are more concerned about what others are saying rather than giving their own opinions! Really no offence, but it would be just fine to give your own ideas and let other people give their own ideas as well, unless and until someone write offensive stuff. there is no harm in it, right? It does not look nice when you point out somebody telling that he/she is giving misleading advice. Sorry i am writing this way but i just have seen to0 much of this recently.
Komal Arora wrote:you know what he is a beginner in java, and when i was a beginner i learned the same way and hence i told him to do so. this is not misleading advice.
But are you still continuing to save your programs in the "bin" directory ? I think NO, you won't be saving it after almost 2 years ( looking at your joining date), WHY ? Because you have now realized that "bin" was a wrong place to save your files. So why are you advising a beginner the same advice? Will the OP learn Java faster with that, i don't think so. I might be sounding harsh but i am not in reality, so here's a smiley face
Komal Arora wrote: but i feel that people here are more concerned about what others are saying rather than giving their own opinions!
People have to look at what the OP is saying, what others are saying and everything because this is how we all learn. I will learn by what you say in your post and vice versa. Its a 2-way learning process
Komal Arora wrote: It does not look nice when you point out somebody telling that he/she is giving misleading advice.
I would be really happy if someone says that you are wrong, this is because i will get to learn something and yes who doesn't feel good if someone praises their post ?
Komal Arora wrote: Really no offence
>edit> What Campbell said was absolutely true </edit>
Joined: Oct 13, 2005
You said it far better than I could have, Rameshwar Soni. Thank you.