aspose file tools*
The moose likes Beginning Java and the fly likes regarding package compilation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "regarding package compilation" Watch "regarding package compilation" New topic
Author

regarding package compilation

Neha Aggarwal
Greenhorn

Joined: May 06, 2010
Posts: 11
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

Joined: Mar 09, 2009
Posts: 600
Neha:

Please use code tags.

John.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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

Joined: May 06, 2010
Posts: 11


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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: May 06, 2010
Posts: 11
thanks sir it worked
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Glad to hear you got it figured out :)
Neha Aggarwal
Greenhorn

Joined: May 06, 2010
Posts: 11
What could be the reason of tomcat startup failure?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Anything.

Please start a new thread for new questions; Tomcat questions should go in the Tomcat forum. Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regarding package compilation