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

regarding package compilation

 
Neha Aggarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using com.example.we and com.example.model packages. First one contains BeerSelect.java and second one has BeerExpert.java
and i have to use BeerExpert.java in BeerSelect. Both are in tomcat but compilation of BeerSelect.java is prompting error on import of com.example.model and thus code is prompting obvious errors. Here are the files

BeerSelect.java

BeerExpert.java

Please help me with this.
thanks
 
John de Michele
Rancher
Posts: 600
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Neha:

Please use code tags.

John.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for adding the code tags :)

They might be deployed to Tomcat, but the classpath used for the compilation itself isn't correct. How are you compiling the classes?
 
Neha Aggarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


this is what i am using to compile BeerSelect.java as mentioned above. And BeerSelect is using BeerExpert. I have kept both the files in jdk/bin folder.

Please tell me if i am making any mistake because i think i am but really cannot figure out what is it
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to have the classes directory on the classpath if that's where you're expecting your compiled classes to be.
 
Neha Aggarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks sir it worked
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad to hear you got it figured out :)
 
Neha Aggarwal
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What could be the reason of tomcat startup failure?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anything.

Please start a new thread for new questions; Tomcat questions should go in the Tomcat forum. Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic