Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Another Noob another Head First Java compiling error  RSS feed

 
Joe Sansone
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everyone, I just want to make it a point to tell everyone I did search the forums and looked at previous postings regarding this issue as well as followed the instructional videos that had me create a "new" system variable "JAVA_HOME" and its value is set as "C:\Program Files\Java\jdk1.5.0_11" and add the bin directory to end of the "Path" variable.

However, I had a question concerning the last step... I'm using windows 10, and when I went to edit the "path" it didn't display how it looked in the video, it gave me the option to add a new line which I'm assuming is the same thing as adding a semi-colon followed by the path to the bin?
If not I need to fix that.

Background on me:

I'm graduating college in a few months and I'm a little frightened about what knowledge I've obtained pertaining to programming. Today I decided I want to understand it much more than I already do, so I decided to buy this book that seemed highly recommended for anyone starting to use java. I've done some programming in J++, Swift, C++, and basic html, php. I've always used an IDE, I'm going to attempt to go through this Java book as slow as possible and maybe it refines and betters my coding!

I'm struggling though and looking for guidance as I hit a pitfall pretty early in the book.

I'm doing the "99 bottles of beer" program just to test my compiler and make sure everything is working correctly.

Guest what -.- it's not. I plan on being very active in this community and seek any professional tips and guidance anyone has for me, but for now to the problem (:



I've attached 3 screenshots of what I'm seeing when trying to run the code. I'm using jdk1.5 / j2se api documentation 8 / Notepad ++

Any help would be greatly appreciated.
Capture1.PNG
[Thumbnail for Capture1.PNG]
Capture4.PNG
[Thumbnail for Capture4.PNG]
Capture5.PNG
[Thumbnail for Capture5.PNG]
 
Joe Sansone
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The attached file is what I'm seeing what I select "Path" under "System Variables" and hit "Edit" that is the screen that pops up and I wasn't quite sure how to handle the difference.
Capture7.PNG
[Thumbnail for Capture7.PNG]
Capture.PNG
[Thumbnail for Capture.PNG]
 
Carey Brown
Bartender
Posts: 2992
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Upper case letter that should be lower case.
 
Carey Brown
Bartender
Posts: 2992
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With rare exception it is preferred that you cut and paste text into your post instead of posting screen snapshots.
 
Joe Sansone
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carey Brown wrote:Upper case letter that should be lower case.


I kind of gave a lot of information... can you be more specific?
 
Carey Brown
Bartender
Posts: 2992
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the line your error message was complaining about.
 
Henry Wong
author
Sheriff
Posts: 23283
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Sansone wrote:
I kind of gave a lot of information... can you be more specific?


I think you gave way too much information. As mentioned by Carey, you need to focus on the line that the compiler is complaining about.

Henry
 
Joe Sansone
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carey Brown wrote:With rare exception it is preferred that you cut and paste text into your post instead of posting screen snapshots.


I'll keep that in mind, but you can't cut and paste something such as "System Variables" and as its my first day I wanted to make it abundantly clear I followed directions.
 
Joe Sansone
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Henry Wong wrote:
Joe Sansone wrote:
I kind of gave a lot of information... can you be more specific?


I think you gave way too much information. As mentioned by Carey, you need to focus on the line that the compiler is complaining about.

Henry


I understand that I need to be worried more about line 6 of the code, but in the book it states " There's still one little flaw in our code. It compiles and runs, but the output isn't 100% perfect. " I copied it directly from the book, so I still don't understand the issue.
 
Carey Brown
Bartender
Posts: 2992
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Sansone wrote:I understand that I need to be worried more about line 6 of the code, but in the book it states " There's still one little flaw in our code. It compiles and runs, but the output isn't 100% perfect. " I copied it directly from the book, so I still don't understand the issue.
You have a typo in what you copied.
 
Carey Brown
Bartender
Posts: 2992
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P.S.
This is the kind of hair-pulling error that everyone makes now and again. Finding this is good practice for later.
 
Joe Sansone
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Carey Brown wrote:P.S.
This is the kind of hair-pulling error that everyone makes now and again. Finding this is good practice for later.


I know it's late, I'm tired. I should just go-to bed, I re-typed the code and it's working perfectly fine now. Thank you for your help!
 
Carey Brown
Bartender
Posts: 2992
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Sansone wrote:
Carey Brown wrote:P.S.
This is the kind of hair-pulling error that everyone makes now and again. Finding this is good practice for later.


I know it's late, I'm tired. I should just go-to bed, I re-typed the code and it's working perfectly fine now. Thank you for your help!

Glad the re-type fixed it. You had an upper case 'W' at the beginning of 'while'.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!