I want to know how can i use the datagram socket class which is provided by java.net package in blackberry. I tried to use it but it the compiler is not able to find the java.net package.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ve confused Java-SE with Java-ME. BlackBerry devices do not run the full desktop Java. The language is close to Java 1.3, which was released around the year 2000. The APIs available are intentionally cut down, to save on device storage. Specifically, it looks like you want to use java.net.DatagramSocket, but as you’ve noticed, that isn’t available for Java-ME BlackBerry devices. Instead, you should use the Connector class to create a DatagramConnection