File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Head First Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Head First Question" Watch "Head First Question" New topic
Author

Head First Question

Drew Sullivan
Greenhorn

Joined: Feb 27, 2008
Posts: 18
I am as new to Java as you can get. Anyway, i just got the Head First java book, and i have a question from the installation instructions...

From the book:

"Once you've downloaded and unpacked, you need to add an entry to your PATH environment variable that points to the /bin directory inside the main Java directory. For example, if the J2SDK puts a directory on your drive called "j2sdk1.5.0", look inside that directory and you'll find the "bin" directory where the Java binaries (the tools) live. That bin directory is the one you need a PATH to, so that when you type %Javac at the command-line, your terminal will know how to find the javac compliler."

First of all, I downloaded the JDK, but i assume that is the same thing as the SDK. My problem is, though, I have no idea what it means by "add an entry to your path environment"... How do I do what this paragraph is telling me to do?
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Welcome to JavaRanch!

Yes, JDK (Java Development Kit) is another name for the SDK (Software Development Kit).

The system PATH variable is a list of different paths. When you type something like "javac" at the command line, your system will check the different paths listed in the PATH variable until it finds the location of "javac." Basically you are telling your computer where to find these tools.

If you are running Windows, see step 4 of Sun's installation instructions for Windows. (If you are not running Windows, let us know.)


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Drew Sullivan
Greenhorn

Joined: Feb 27, 2008
Posts: 18
Wow, fast reply. Thanks.

However, i did just come to a certain realization. I hadn't installed a section of the JDK. However, when i try to, it says that it can't install because it is not compatible with my processor. Can i fix that?
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Drew Sullivan:
...I hadn't installed a section of the JDK. However, when i try to, it says that it can't install because it is not compatible with my processor. Can i fix that?

What type of processor and operating system are you running?

What version of the JDK are you installing?

What part of the JDK is not installing, and what are the exact error messages are you getting?
[ February 27, 2008: Message edited by: marc weber ]
Drew Sullivan
Greenhorn

Joined: Feb 27, 2008
Posts: 18
Okay, I have windows xp.

I downloaded the Java 6 Update 4 JDK

I am trying to installing this: jdk-6u4-windows-x64.exe

Lastly, the error massage is: "This installation package is not supported by you processor type. Please contact vendor.
Drew Sullivan
Greenhorn

Joined: Feb 27, 2008
Posts: 18
UPDATE: I have fixed the problem and everything is working fine now.
[ February 27, 2008: Message edited by: Drew Sullivan ]
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Drew Sullivan:
UPDATE: I have fixed the problem and everything is working fine now...

That's good to hear!

(I'm guessing the 64-bit version was the problem?)
Drew Sullivan
Greenhorn

Joined: Feb 27, 2008
Posts: 18
Yes, that was the problem.

Now, when i copy the 99 bottles of beer code directly from the book and try to compile it, it won't compile because there's 39 problems! I have already complied some things successfully, so im not sure why this one is having so many issues... In the book they say it should compile perfectly, so i don't really understand whats going on here.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Can you post the exact code you're using?
Drew Sullivan
Greenhorn

Joined: Feb 27, 2008
Posts: 18
Here is the code here:



EDIT: Fixed one thing copied wrong.
[ February 28, 2008: Message edited by: Drew Sullivan ]
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Hmmm... That compiles and runs fine for me. Can you post the error messages you're getting?
Drew Sullivan
Greenhorn

Joined: Feb 27, 2008
Posts: 18
Oh, wow. I am really sorry for wasting your time. I had it saved as TheBeerSong.java instead BeerSong.

I really appreciate you helping me, so i'll make sure i check a little harder before asking questions. Again, sorry.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11475
    
  16

problems like these are common to all beginners. don't let them discourage you!!!

You should be proud that you figured many of these out on your own. many people get frustrated and quit, but you kept at it. that is a great quality for any developer to have.

Congratulation, and welcome to the Ranch!!!


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Drew Sullivan
Greenhorn

Joined: Feb 27, 2008
Posts: 18
Oh, im not giving up any time soon. This community is great. See, maybe if I didn't have anyone to help me and got stuck with no one who would answer, then i'd have an issue. I've been to other communities trying to learn various things, and the members are complete jerks to new people. However, here that is obviously not the case.

Now, on the other hand, I just noticed something when going back and reviewing the introduction of this book. It says that is book is for people who have programming experience either in C++, HTML, or anything with looping. The problem is, I don't have any experience in programming at all. None, nada, zlitch. Is that going to be an issue?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39782
    
  28
Originally posted by Drew Sullivan:
It says that is book is for people who have programming experience either in C++, HTML, or anything with looping. The problem is, I don't have any experience in programming at all. None, nada, zlitch. Is that going to be an issue?
No
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Drew Sullivan:
... It says that is book is for people who have programming experience either in C++, HTML, or anything with looping. The problem is, I don't have any experience in programming at all. None, nada, zlitch. Is that going to be an issue?

I think you'll be fine. Head First Java is the best book I've seen for true beginners. I wish it had been around when I started.
Drew Sullivan
Greenhorn

Joined: Feb 27, 2008
Posts: 18
Ah, thanks.

That's good to hear!
Christopher Young
Ranch Hand

Joined: Nov 02, 2007
Posts: 63
I also started out with no experience (well, save a little HTML, a long time ago) with programming. Picked up Java over the start of the school year and am starting to actually understand it.

It's really not that scary. The first few weeks are horrid, but then you get the basics, and when you understand classes and objects and how they interact then the fun really starts.

Loops are nothing to be intimidated by. All they do is execute the same lines of code over and over so you don't have to re-write every line (extremely useful!)


Technology can never substitute for knowledge.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Head First Question