This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am creatig a small client java program and i am importing some classes but i had errors during compilation, the error is that cannot find the package! How to find it ?where to put it?This is my code:
It would be helpful if you could post the full error message. (And it is generally a good idea to do such when posting questions. - See the TellTheDetails tip for more information.)
Most likely your issue is that the package that is not being found in not on your classpath. So most likely you need to adjust your classpath. If its the org.apache.axis.client package not being found, you need to add the Apache Axis JAR to your classpath. (If you are not sure how to do that, let us know and we can show you.) But depending on the error message you are getting, there may be other things you may need to do. [ August 04, 2008: Message edited by: Mark Vedder ]
Dear Thank you for your response.I am using NetBeans. How to include a classpath using NetBeans? When I used JDK1.5.0_16 from command line I got the following:
C:\tomcat50-jwsdp\tomcat50-jwsdp\webapps\axis\WEB-INF\classes>javac -cp %AXISCLA SSPATH% %AXIS_HOME%\web-inf\classes\Client\src\client\Client.java C:\TOMCAT50-JWSDP\TOMCAT50-JWSDP\WEBAPPS\AXIS\web-inf\classes\Client\src\client\ Client.java:10: java.security.Provider.Service is already defined in a single-ty pe import import org.apache.axis.client.Service; ^ C:\TOMCAT50-JWSDP\TOMCAT50-JWSDP\WEBAPPS\AXIS\web-inf\classes\Client\src\client\ Client.java:20: cannot find symbol symbol : constructor Service() location: class java.security.Provider.Service Service service = new Service(); ^ C:\TOMCAT50-JWSDP\TOMCAT50-JWSDP\WEBAPPS\AXIS\web-inf\classes\Client\src\client\ Client.java:21: cannot find symbol symbol : method createCall() location: class java.security.Provider.Service Call call = (Call) service.createCall(); ^ 3 errors