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

Running in to some trouble

 
ner ieru
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there, I just got "Head First Java (2nd edition)"

And ran into some trouble with the examples on page 12 & 13

It compiles just fine, but when I try to run the class file I get the following error:

And this is the actual code:


What am I doing wrong?

Btw I'm using notepad++ to write my code, just the cmd from my windows xp sp3 for compiling and running the .class from the .java file

So I compile (which goes just fine) Hence I think the problem might be somewhere in my JDK folder
I can't run, I was able to run the first example though..

Any help is greatly appreciated

Kudos,
~nerieru
 
harilal ithikkat
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no need of extension

java DooBee is enough
 
harilal ithikkat
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JAVARANCH.......
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As harilal ithikkat pointed out, you should compile using

javac DooBee.java

and run using
java DooBee

not

java DooBee.class
 
ner ieru
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, that fixed my problems! I thank you kindly

And thanks for the welcome
 
ner ieru
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I don't see an edit button

I would also like to thank you for your quick replies!

Edit: and after posting this message it appeared
 
fred rosenberger
lowercase baba
Bartender
Pie
Posts: 12097
30
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "cattle drive" forum is for questions about the Cattle Drive and it's assignments. this question probably belongs in the 'beginners' forum, so I'll move it over there for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic