Results 1 to 4 of 4
Thread: Package not found
- 10-25-2010, 05:26 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 1
- Rep Power
- 0
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 06:00 PM. Reason: code tags added
-
Moving to the new to Java section as this isn't an advanced question.
- 10-25-2010, 06:02 PM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
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.
- 10-25-2010, 06:06 PM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Regarding your question, looking at the following,
I wonder that you've define two levels of ussd folders. Did you?import com.leibict.ussd.USSD;
Similar Threads
-
run package inside anthor package
By AhmedAdel in forum AWT / SwingReplies: 4Last Post: 04-20-2010, 11:52 AM -
The declared package does not match the expected package
By oneforall in forum EclipseReplies: 7Last Post: 11-09-2009, 07:51 AM -
no jre,jvm found error
By rocky05 in forum EclipseReplies: 2Last Post: 01-27-2009, 03:38 PM -
Web Application not found
By adtd8 in forum JavaServer Pages (JSP) and JSTLReplies: 7Last Post: 07-28-2008, 02:05 AM -
404 Not Found
By mary in forum Java ServletReplies: 5Last Post: 11-07-2007, 10:15 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks