posted 17 years ago
hi,
i have really stupid problem with compilation.
my catalogs tree looks:
D:\javrob\Piwo-w1\classes\com\example\web
D:\javrob\Piwo-w1\classes\com\example\model
and src:
D:\javrob\Piwo-w1\src\com\example\web\WyborPiwa.java
D:\javrob\Piwo-w1\src\com\example\model\EkspertPiwny.java
the .java files looks:
//------------------------------------------
//---------------------------------------------
//---------------------------------------------
first i compile ExpertPiwny.java:
D:\javrob\Piwo-w1>javac -classpath v:\tomcat\common\lib\servlet-api.jar -d classes src\com\example\model\EkspertPiwny.java
Note: src\com\example\model\EkspertPiwny.java uses unchecked or unsafe operation
s.
Note: Recompile with -Xlint:unchecked for details.
So i have new .class file in correct place D:\javrob\Piwo-w1\classes\com\example\model\ExpertPiwny.class
NEXT is a problem I WANT COMPILE second file but it doesn't work :
D:\javrob\Piwo-w1>javac -classpath v:\tomcat\common\lib\servlet-api.jar -d classes src\com\example\web\*.java
src\com\example\web\WyborPiwa.java:3: package com.example.model does not exist
import com.example.model.*;
^
src\com\example\web\WyborPiwa.java:21: cannot find symbol
symbol : class EkspertPiwny
location: class com.example.web.WyborPiwa
EkspertPiwny be = new EkspertPiwny();
^
src\com\example\web\WyborPiwa.java:21: cannot find symbol
symbol : class EkspertPiwny
location: class com.example.web.WyborPiwa
EkspertPiwny be = new EkspertPiwny();
^
3 errors
Why it doesn't import needed files if EkspertPiwny.class is in correct place?
WHERE IS WRONG? why it doesn't work
thanks for any help