Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trouble installing jdk

 
elliott riveros
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Komal Arora
Ranch Hand
Posts: 91
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

hope it helps
 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You seem ready to create your first Java program !
 
Campbell Ritchie
Sheriff
Posts: 48647
56
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gurpeet singh wrote:you have downloaded jdk . . . you need to download jre also . . .
No you don’t. You only need the JDK.
 
Campbell Ritchie
Sheriff
Posts: 48647
56
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Komal Arora wrote: . . . save it as a .java file in the bin folder of jdk. . . .
That is poor advice. You should create your own folder for your own work. Otherwise you can lose all your work when you upgrade Java.
 
Komal Arora
Ranch Hand
Posts: 91
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:
Komal Arora wrote: . . . save it as a .java file in the bin folder of jdk. . . .
That is poor advice. You should create your own folder for your own work. Otherwise you can lose all your work when you upgrade Java.


Yes i know. But the person who posted it seems to be a beginner and hence i just told how to get started with java.

Using your own folders SHOULD be followed everytime!
 
Campbell Ritchie
Sheriff
Posts: 48647
56
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Komal Arora wrote: . . . Yes i know. . . .
… and still posted misleading and confusing advice.
 
Komal Arora
Ranch Hand
Posts: 91
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Rameshwar Soni
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Same here


>edit> What Campbell said was absolutely true </edit>
 
Campbell Ritchie
Sheriff
Posts: 48647
56
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You said it far better than I could have, Rameshwar Soni. Thank you.
 
Komal Arora
Ranch Hand
Posts: 91
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i use ide's for development so there is no question saving files in bin. i did that bin thing when i ran my first java program.

For all the things said. i'm sorry. thats all i have to say.
 
Campbell Ritchie
Sheriff
Posts: 48647
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apologies accepted
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic