Results 1 to 4 of 4
  1. #1
    doncigalo is offline Member
    Join Date
    Oct 2010
    Posts
    1
    Rep Power
    0

    Default Package not found

    Hi,
    Ive been trying to compile the code below (Main.java) but i keep getting this error: Package com.leibict.ussd.USSD doesnt exit. The Package does exist (USSD2.java)as well as
    as corresponding file path which are com/leibict/ussd/.


    Java Code:
    package ussdtest;
    
    import com.leibict.ussd.USSD;
    
    public class Main
    {
    
        public Main()
        {
        }
    
        public static void main(String args[])
        {
            try
            {
                int res = USSD.initialize();
                res = USSD.connect("localhost", 5404);
                do
                {
                    Thread.sleep(1000L);
                } while(true);
            }
            catch(InterruptedException x)
            {
                return;
            }
        }
    Java Code:
    
    This is the second code which ive put in the com/leibict/ussd/ folder, ive also generated d class file :
    
    
    [COLOR="Green"]package com.leibict.ussd;
    
    import java.io.PrintStream;
    
    public class USSD2
    {
    
        public USSD2()
        {
        }
    
        public static native int initialize();
    
        public static native int connect(String s, int i);
    
        public static native int ussd_request(int i, String s);
    
        public static native int ussd_end(int i, String s);
    
        public static native int ussd_requestShortCode(String s);
    
        private static native int pong();
    
        private static void cb_ussd_service(int dialogId, String shortCode, String phoneNumber)
        {
            System.out.println((new StringBuilder()).append(dialogId).append(" ").append(shortCode).append(" ").append(phoneNumber).toString());
            int res = ussd_end(dialogId, "bye!");
            System.out.println(res);
        }
    
        private static void cb_ussd_serviceEx(int dialogId, String shortCode, String destinationReference, String originationReference, String destinationNumber, String originationNumber, String msisdn)
        {
            System.out.println((new StringBuilder()).append(dialogId).append(" ").append(shortCode).toString());
            int res = ussd_end(dialogId, "bye!");
            System.out.println(res);
        }
    
        private static void cb_ussd_response(int dialogId, String str)
        {
            System.out.println("cb_response");
        }
    
        private static void cb_ussd_end(int dialogId)
        {
            System.out.println("cb_end");
        }
    
        private static void cb_disconnected()
        {
            System.out.println("cb_disconnected");
        }
    
        private static void cb_connected()
        {
            System.out.println("cb_connected");
        }
    
        private static void cb_ping()
        {
            System.out.println("cb_ping");
            pong();
        }
    
        static 
        {
            System.loadLibrary("ussdjni");
        }
    }[/COLOR]



    Any ideas on where im gng wrong ?

    Regards.
    Last edited by Eranga; 10-25-2010 at 07:00 PM. Reason: code tags added

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

  3. #3
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Please use code tags also, when you are posting code segments in the forum. Unformated codes are really hard to read. If you don't know how to do that please check my forum signature. You can find a relevant link.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. run package inside anthor package
    By AhmedAdel in forum AWT / Swing
    Replies: 4
    Last Post: 04-20-2010, 12:52 PM
  2. Replies: 7
    Last Post: 11-09-2009, 08:51 AM
  3. no jre,jvm found error
    By rocky05 in forum Eclipse
    Replies: 2
    Last Post: 01-27-2009, 04:38 PM
  4. Web Application not found
    By adtd8 in forum JavaServer Pages (JSP) and JSTL
    Replies: 7
    Last Post: 07-28-2008, 03:05 AM
  5. 404 Not Found
    By mary in forum Java Servlet
    Replies: 5
    Last Post: 11-07-2007, 11:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •