Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with import package

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
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
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place.
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic