By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,648 Members | 1,528 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,648 IT Pros & Developers. It's quick & easy.

Error in Java Code - Kindly help me

sreekandank
P: 45
I have created the following java code:
Expand|Select|Wrap|Line Numbers
  1. package myhellomsgclient;
  2. import java.io.*;
  3. import javax.servlet.*;
  4. import javax.servlet.http.*;
  5. public class HelloMsgClientProg extends HttpServlet
  6. {
  7.  public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
  8.  {
  9.   res.setContentType("text/html");
  10.   PrintWriter out=res.getWriter();
  11.   SimpleHelloMessage_Impl service=new SimpleHelloMessage_Impl();
  12.   MyInterface stub=service.getMyInterfacePort();
  13.   //ConverterInterface service=(new SimpleCurrencyConverter_Impl()).getConverterInterfacePort();
  14.   String str=service.helloFun("hello from client");
  15.   out.println(str);
  16.  }
  17. }
I am unable to access the classes and interfaces from the package. Stating the following Error messages during the compilation.

C:\jwsdp-1.3\webapps\HelloMessageClient\WEB-INF\classes>set path="C:\j2sdk1.4.2_
05\bin";

C:\jwsdp-1.3\webapps\HelloMessageClient\WEB-INF\classes>javac myhellomsgclient/H
elloMsgClientProg.java
myhellomsgclient/HelloMsgClientProg.java:11: cannot resolve symbol
symbol : class SimpleHelloMessage_Impl
location: class myhellomsgclient.HelloMsgClientProg
SimpleHelloMessage_Impl service=new SimpleHelloMessage_Impl();
^
myhellomsgclient/HelloMsgClientProg.java:11: cannot resolve symbol
symbol : class SimpleHelloMessage_Impl
location: class myhellomsgclient.HelloMsgClientProg
SimpleHelloMessage_Impl service=new SimpleHelloMessage_Impl();
^
myhellomsgclient/HelloMsgClientProg.java:12: cannot resolve symbol
symbol : class MyInterface
location: class myhellomsgclient.HelloMsgClientProg
MyInterface stub=service.getMyInterfacePort();
^
3 errors

C:\jwsdp-1.3\webapps\HelloMessageClient\WEB-INF\classes>

Kindly Help Me...Thanks in advance ...
Mar 31 '12 #1
Share this Question
Share on Google+
1 Reply


P: 79
you have to add import statement for you class for example
Expand|Select|Wrap|Line Numbers
  1.  import myhellomsgclient.testclass;
Apr 2 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.