| Author |
Difficulty Running a Program that imports user-define package
|
Sandra Bachan
Ranch Hand
Joined: Feb 18, 2010
Posts: 434
|
|
Hello,
On Chapter 1 of Sierra/Bates, they give code snippits:
Saved in /one/src/Toon.java
Saved in /one/src/Cloo.java
Saved in /one/src/Roo.java
I am able to compile by going to the terminal, navigating to the one directory, and typing in
javac -d ./classes/ ./src/*.java
So how do I run Toon? Which directory do I go to so I don't get errors such as:
Exception in thread "main" java.lang.NoClassDefFoundError: Toon
|
Marriage Made in Heaven
http://www.youtube.com/user/RohitWaliaWedsSonia
|
 |
Sandra Bachan
Ranch Hand
Joined: Feb 18, 2010
Posts: 434
|
|
Bump
Any input?
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
Sandra Bachan wrote:Bump
Please read this.
Since Toon class is not in any package, so you need to go into /one/classes directory and run the command java Toon . That should work...
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
Sandra Bachan
Ranch Hand
Joined: Feb 18, 2010
Posts: 434
|
|
Awesome!
I appreciate the info provided in the link - usually this forum is very very responsive, hence anxious *BUMP*
|
 |
 |
|
|
subject: Difficulty Running a Program that imports user-define package
|
|
|