Buid error and I do not understand why

Hello

I'm a newbe in Java and I can't build this application. Can someone help me? Thank you

Bernard

Building SenderSmsBernard
C:\Program Research In Motion\BlackBerry JDE 5.0.0\bin\rapc.exe-codename-quiet = com\rim\samples\device\SenderSmsBernard\SenderSmsBernard com\rim\samples\device\SenderSmsBernard\SenderSmsBernard.rapc warnkey = 0 x 52424200; 0 x 52525400; 0 x 52435200 import =... \lib\net_rim_api.jar "C:\Program research in Motion\BlackBerry JDE 5.0.0\samples\com\rim\samples\device\SenderSmsBernard\img\SenderSmsBernard_jde.png" "C:\Program search in Motion\BlackBerry JDE 5.0.0\samples\com\rim\samples\device\SenderSmsBernard\SenderSmsBernard.java".
C:\Program Research In Motion\BlackBerry JDE 5.0.0\samples\com\rim\samples\device\SenderSmsBernard\SenderSmsBernard.java:34: incompatible types
found: javax.microedition.io.Connection
required: javax.microedition.io.file.FileConnection
fileConnection = Connector.open ("file:///SDCard/testfile.txt");
^
1 error
Error! : error: failed java compiler: javac - 1.3 source-target 1.3 - g - O-d C:\Users\Bernard\AppData\Local\Temp\rapc_33f1d149.dir - bootc...
Error while building project

And my code:

package com.rim.samples.device.SenderSmsBernard;
import java. IO;
import java.io.InputStream;
import java.io.IOException;
Import Java.util;
Javax.microedition.io import. *;
Import javax.microedition.io.Connector;
Javax.microedition.io.file import. *;
Javax.wireless.messaging import. *;
Net.rim.device.api.io import. *;
Import net.rim.device.api.io.SharedInputStream;
Net.rim.device.api.system import. *;
Net.rim.device.api.ui import. *;
Net.rim.device.api.ui.component import. *;
Net.rim.device.api.ui.container import. *;
Net.rim.device.api.ui.picker import. *;
SerializableAttribute public class SenderSmsBernard extends Application
{
private static final int MAX_PHONE_NUMBER_LENGTH = 32;
private String addr = "0033610101010";
private String msg = "this is a test message ';
private DatagramConnection _dc = null;
private static String _openString = "sms: / /";
public private static InputStream inputStream = null;
private static FileConnection fileConnection = null;
Public Shared Sub main (String [] args)
{
new SenderSmsBernard () .enterEventDispatcher ();
}
public SenderSmsBernard()
{
try {}

fileConnection = Connector.open ("file:///SDCard/testfile.txt");
If (fileConnection.exists ())
{inputStream = fileConnection.openInputStream () ;}

_DC = (DatagramConnection) Connector.open (_openString);
data Byte [] = msg.getBytes ();
Datagram d = _dc.newDatagram (_dc.getMaximumLength ());
d.setAddress ("/ /" + ADR + ' "'");
d.setData (data, 0, data.length);
_DC. Send (d);
} catch (IOException e) {}
System.Exit (0);
}
}

Thanks for your help!

Everything is good now

Bernard

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for

  • Bootcamp partitions not bootable with iMac 2015

    Hi guys,. I tried to install boot camp on my iMac (late 2015, Fusion drive) without success. Download a picture ISO of Windows 10. Point the wizard Boot camp on the image. Create a partition for Windows. Click install and wait until the end. Restarti

  • Question how to put in shape the Qosmio

    Hi Toshiba, I have a Toshiba Qosmio and it is about 3 years old, when I bought it I do not have a windows cd as it was already installed. Its been running slowly lately and I want to reformat it, but how can I do it without the windows disc? and help

  • How to overcome the 'Error678 '?

    I think it may be corrupt files, but am not sure and still don't know how to eradicate it.  The ideas people?

  • When I connect my SanDisk Sansa Clip MP3 player Zip I get Code 10 device cannot start

    Original title: Code 10 When I try to plug in my SanDisk Sansa Clip Zip MP3 player I get the device Code 10 cannot start.  I have XP.  The MP3 came with a 2.0 USB.  I don't know what the USB on my computer.

  • How to restore missing "show the menu button" in Windows live mail?

    I want to use the bar hidden in Windows live mail, but the "Show menu bar" button is missing.  It should be between the stylus buttons and helps, but isn't. In fact the pen button is also absent, but the help button is there. Pressing alt quite appea