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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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: 67750
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.
 
I found a beautiful pie. And a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
    Bookmark Topic Watch Topic
  • New Topic