Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ page 85

 
Goutham Reddy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
if i set my class path as
E:\java\dev\MyProject\beerV1>javac -classpath E:\java\dev\MyProject\beerV1\src\ -d classes src/com/example/web/BeerSelect.java.

i am able to compile,i have my servle-api.jar in classpath.But i am getting error if i zip the package and place it in classpath
E:\java\dev\MyProject\beerV1>javac -classpath E:\java\dev\MyProject\beerV1\lib\com.zip -d classes src/com/example/web/BeerSelect.java

And error message is

E:\java\dev\MyProject\beerV1\lib\com.zip(com/example/model/BeerExpert.java):4: class BeerExpert is public, should be declared in a file named BeerExpert.java (source unavailable)
1 error
 
Goutham Reddy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got it.I zipped the com package from MyProject\beerV1\src\com... instead of MyProject\beerV1\classes\com...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic