On Mar 2, 6:24 am, Anton Shaykin <[email protected]> wrote:
> As I searched through all the threads, concerning lab 1003, I found
> that many people asked this question but it's still unsolved.
> So, in the exercise 2.3 I do everything like it's said, and after I
> type "C:\Java Programs>javac studentpackage/*.java" I get (I copied
> this error message from another thread, but I get exactly the same):
>
> C:\myjavaprograms>javac studentpackage\*.java
> studentpackage\StudentRecord.java:3: package anotherpackage does not
> exist
> import anotherpackage.*;
> ^
> studentpackage\StudentRecord.java:18: cannot resolve symbol
> symbol  : class DummyClass
> location: class studentpackage.StudentRecord
>         DummyClass dummy = new DummyClass();
>         ^
> studentpackage\StudentRecord.java:18: cannot resolve symbol
> symbol  : class DummyClass
> location: class studentpackage.StudentRecord
>         DummyClass dummy = new DummyClass();
>                                ^
> 3 errors
>
> So it appears that compiler can't find anotherpackage, however it
> resides in the same directory as studentpackage, and I do everything
> just how it was described.
> Did anyone have the same issue?
I just completed this lab. No issue. My guess is, DummyClass.java is
not inside anotherpackage.

>
> What's more weird, when I type "C:\Java Programs>javac -cp .
> studentpackage/*.java" it works! But how could -cp be connected with
> compiler at all? It just doesn't make any sense.
>
> Thank you.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to