"John Smith" <wleung7@gmail.com> wrote in news:1141335221.030238.307960
@i40g2000cwc.googlegroups.com:
> I tried:
> javac -verbose -g vvs.java
[quoted text clipped - 16 lines]
>
> Any suggestion for a fix is appreciated.
Please follow the Java naming conventions. All classes should start
with a capital letter, and use meaningful words. "vvs" is not a good
classname. Following conventions will help you in the long run, trust
me.
You seem to have two problems here:
1. javac doesn't automatically look for class files in the current
directory. Instead, it looks on the classpath. Some people prefer to
set the classpath in a system variable, but I find it easier to add it
on the command line (for simple projects anyway) To specify the current
directory, you use a dot, like this:
javac -cp . vvs.java
2. you're using packages, so instead of looking in the directory listed
on the classpath, javac looks in a subdirectory thereof. In this case,
it will look in a subdirectory called com/dt/scenery or com\dt\scenery,
depending on your OS. Make sure the .class file is in this
subdirectory. You can make javac place it there automatically when
compiling, by using the -d option:
javac -d . Entry.java
Of course this only works if you have the source for Entry, and not just
the class file.
As a final note, I find it easier to compile all source files at once
(again, in simple projects) since this eliminates possible dependency
problems. I would typically use this command line:
javac -cp .;somejar.jar -d . source/*.java