Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiler error!

 
gurneeraj singh
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I am trying to compile code on page no. 84 of HFSJ 2nd edition. I am getting compiler error on import statement (import com.example.model.* stating package com.example.model doesnot exist.

I have made the deployment and development envoirnment as per the directions given in the book.

I have also put the BeerExpert.class file in the src\com\example\model directory.

I am using windows operating system.
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you compiling your class? Are you using some IDE or you are using command line?
 
gurneeraj singh
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using command-line to compile this class.
 
Garlapati Ravi
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
every one who visits this site may not be using HFSJ right ?
please try to post the code as well if possible
 
Amit M Tank
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you are using the command line. what is the base directory from where you are running the javac? Make sure that you are in the /src dir when using javac option.

I would recommend you to use eclipse Id/Ant Script to compile your code. It makes things easier. However, compiling it from command line should not be a problem if you are doing it the right way.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic