This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi everybody, I'm new to the forums, so thanks for letting me join in on the fun! I've been programming java for about 4 months now.
My problem seems to be the way I'm trying to tell my java to run a class in a package. Whenever I try to run my VehicleTest.class file from my terminal I get the following error:
As you can probably tell, I'm using Ubuntu Linux (Natty). I'm almost certain that my java is set up correctly, due to when I use the command "java -version" it pops up with"
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)"
I can run programs that are not in a package, or in the default package with no problem. I know that my code is correct because I use Eclipse IDE and it gives no errors and runs perfectly in the internal console.
I don't really know how to show the hierarchy of my files, but here goes.
Starting out with Java
bin | src
practice | practice
VehicleTest.class | VehicleTest.java
The class is part of the package practice. I've been searching for an answer for about an hour and a half ( ) with no luck. I'm pretty sure it's a simple answer and that's why it's so frustrating to me. If you want it, here's the code dump from my files. Thanks so much (in advance) for helpin' me out!