| Author |
Running in to some trouble
|
ner ieru
Greenhorn
Joined: Feb 12, 2009
Posts: 7
|
|
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
Joined: Oct 06, 2008
Posts: 221
|
|
no need of extension
java DooBee is enough
|
SCJP 1.5
"A candle looses nothing by lighting another candle"
itechmentors.com
|
 |
harilal ithikkat
Ranch Hand
Joined: Oct 06, 2008
Posts: 221
|
|
Welcome to JAVARANCH.......
|
 |
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
|
|
As harilal ithikkat pointed out, you should compile using
javac DooBee.java
and run using
java DooBee
not
java DooBee.class
|
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
|
 |
ner ieru
Greenhorn
Joined: Feb 12, 2009
Posts: 7
|
|
Oh, that fixed my problems! I thank you kindly
And thanks for the welcome
|
 |
ner ieru
Greenhorn
Joined: Feb 12, 2009
Posts: 7
|
|
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
Joined: Oct 02, 2003
Posts: 10040
|
|
|
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.
|
Never ascribe to malice that which can be adequately explained by stupidity.
|
 |
 |
|
|
subject: Running in to some trouble
|
|
|