Very easy:how to use com.nokia.mid.ui.DeviceControl class in netbeans 4.1

Dear frnds
I am very new to java. I trieds to turn off my back light using setLights function. But in my Netbeans IDE 4.1 (with mobility 1.4.2 and nokia sdk 2.0) I am not able to import the class com.nokia.mid.ui.DeviceControl. Even I don't know from where netbeans include its classes. From 2 days I checked everything and even moved some libs(zip files) to another place. but still netbeans is compiling MIDP helloworld example. I am trying to import DeviceControl class in midp helloworldplus example. But IDE's error "com.nokia.mid.ui package not found" is irritating me.
Please HElp
Sunny

Dear frnds
I am very new to java. I trieds to turn off my back light using setLights function. But in my Netbeans IDE 4.1 (with mobility 1.4.2 and nokia sdk 2.0) I am not able to import the class com.nokia.mid.ui.DeviceControl. Even I don't know from where netbeans include its classes. From 2 days I checked everything and even moved some libs(zip files) to another place. but still netbeans is compiling MIDP helloworld example. I am trying to import DeviceControl class in midp helloworldplus example. But IDE's error "com.nokia.mid.ui package not found" is irritating me.
Please HElp
Sunny

Similar Messages

  • Req any examples of how to use a USB midi controller​/keyboards with Labview TIA

    Req any examples of how to use a USB midi controller/keyboards with Labview TIA

    Hi,
    To access the MIDI ports you will need to call the Windows SDK. To send MIDI commands is relatively easy, here is an example that shows you how to send data to a MIDI controller or keyboard.
    As far as input goes, this is the hard part. There are a series of functions that you need to call to open up the device, set some buffers and and possibly a callback to get notifications on the incoming data.
    Reading MIDI data will not be an easy task, your best bet will be to implement this in a DLL and call that DLL in LabVIEW, there should be some code available o the web.
    = "http://msdn.microsoft.com/library/default.asp?url​=/library/en-us/multimed/htm/_win32_multimedia_... is a link to the Windows multimedia functions that you could use for MIDI input.
    Let me know if you have any further questions.
    Regards,
    Juan Carlos
    N.I.

  • System.getProperty( "com.nokia.mid.imei" ) return null ?!?!

    hello guys,
    i intend to get the IMEI No. i wrote the following code:
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    public class IMEIDemo extends MIDlet
         Display display;
         private Form mainForm;
         String imeiNokia = "";
         public void startApp()
              display = Display.getDisplay( this );
              mainForm = new Form( "IMEI Demo" );
              imeiNokia = System.getProperty( "com.nokia.mid.imei" );
              if( imeiNokia.compareTo( "" ) == 0 )
                   System.out.println( "NULL..." );
              else
                   mainForm.append( imeiNokia );
                   display.setCurrent( mainForm );
         public void pauseApp()
         public void destroyApp( boolean b )
              destroyApp( false );
              notifyDestroyed();
    } // IMEIDemoi am using WTK2.2, MIDP2, CLDC1.1
    when i run this code in emulator (WToolKit), i got the following Exception:
    startApp threw an Exception
    java.lang.NullPointerException
    java.lang.NullPointerException
         at IMEIDemo.startApp(+36)
         at javax.microedition.midlet.MIDletProxy.startApp(+7)
         at com.sun.midp.midlet.Scheduler.schedule(+270)
         at com.sun.midp.main.Main.runLocalClass(+28)
         at com.sun.midp.main.Main.main(+116)
    would u pls suggest me how can i overcome this problem or any effective openion?
    thanx in advance.
    take care all.
    bye.

    hi
    i tried this program using J2ME to retireve IMEI number
    * IMEINO.java
    * Created on February 19, 2007, 3:50 PM
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    * @author Administrator
    * @version
    public class IMEINO extends MIDlet implements CommandListener{
    public TextField t1,t2,t3;
    public Form form;
    public String s1,s2,s3,n=null;
    public Display disp;
    public Command ok,exit;
    public IMEINO()
    form = new Form("IMEI");
    t1 = new TextField("imei1","",50,TextField.ANY);
    t2 = new TextField("imei2","",50,TextField.ANY);
    t3 = new TextField("imei3","",50,TextField.ANY);
    ok = new Command("ok",Command.OK,1);
    exit = new Command("exit",Command.EXIT,2);
    public void startApp() {
    form.addCommand(ok);
    form.setCommandListener(this);
    form.addCommand(exit);
    form.setCommandListener(this);
    form.append(t1);
    form.append(t2);
    form.append(t3);
    Display disp = Display.getDisplay(this);
    try
    s1 = System.getProperty("com.nokia.mid.imei");
    s2 = System.getProperty("phone.imei");
    s3 = System.getProperty("com.nokia.IMEI");
    if(s1.compareTo("") == 0 || s2.compareTo("")==0 || s3.compareTo("")==0 )
    t1.setString(null);
    else
    t1.setString(s1);
    t2.setString(s2);
    t3.setString(s3);
    catch(Exception e)
    t1.setString("error"+ e.getMessage());
    t2.setString(s2);
    t3.setString(s3);
    disp.setCurrent(form);
    public void commandAction(Command c,Displayable d)
    if(c==ok)
    destroyApp(true);
    notifyDestroyed();
    if(c == exit)
    destroyApp(true);
    notifyDestroyed();
    public void pauseApp() {
    public void destroyApp(boolean unconditional) {
    i tried this program , when i run in the netbeans environment , it shows null (system.out.println(imei)),when i installed the jar file into nokia 3230 mobile,the textfield is null , it shows nothing,can anyone give me any suggestion , whether i have to change my phone settings
    Message was edited by:
    scorpianalways

  • How to use replace(CharacterSequence, CharacterSequence) in String class

    Need simple java program using the following
    how to use replace(CharacterSequence, CharacterSequence) in String class
    Kindly help

    From http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html#replace(java.lang.CharSequence,%20java.lang.CharSequence)
    replace
    public String replace(CharSequence target,
    CharSequence replacement)Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence. The replacement proceeds from the beginning of the string to the end, for example, replacing "aa" with "b" in the string "aaa" will result in "ba" rather than "ab".
    Parameters:
    target - The sequence of char values to be replaced
    replacement - The replacement sequence of char values
    Returns:
    The resulting string
    Throws:
    NullPointerException - if target or replacement is null.
    Since:
    1.5

  • How to use javasetters and getters in different classes

    how to use setters and getters in different class so that the setvalue in one class is effect in second class for getting

    If i got your question right,
    make sure your classes are in the same package
    make sure your getters are public/protected
    make sure your code calls the setter before calling the getter
    Kind regards

  • How to use my nokia 2330 with my macbook pro

    I have a Nokia 2330 and was able to transfer photos using the nokia pc suite and a bluetooth adapter on my old PC.  But now I have a new MacBook Pro and I can't get it to work.
    Is there any software downloads?  How can this be done?  Both phone and mac have bluetooth.

    @Zulumazu
    Unfortunately not compatible with Nokia Multimedia Transfer:http://europe.nokia.com/support/product-support/nokia-multimedia-transfer/download
    You can set it up as Modem with Mac so doesn't Mac find your 2330 Classic?
    http://setup.orange.co.uk/getConnected/gprsguide.asp?ProductId=700000079039&_t=t&sl=700000079045&sl=...
    Happy to have helped forum with a Support Ratio = 42.5

  • How to use COM DLL in LabWindows

    Hello
    I have a COM .dll which looks like that when opened with dll export viewer:
    I would like to use the Get4AxisPos function in LabWindows.
    I understood that, as I only have the .dll, the only way of calling these functions are with the LoadLibrary() and GetProcAddress() functions.
    My problem is that the Get4AxisPos function is not of type Exported Function but COM Method so I don't know how to use it in my LabWindows project!
    My questions are: Is it possibleto use this dll in Labwindows? If yes how?
    Thanks
    Solved!
    Go to Solution.

    Hi ,
    I am new to C++ and COM  .
    i need to implement a client application in C(lab windows CVI) , server is a c++ COM object.
    steps followed by me
    ---> accessed the registered COM object with Labwindows CVI active x controller template,output was a c file which is implementation of the class names in COM (interfaces).
    I can use majority of the functions directly from the generated, but i need to implement some event functions like message box events and then use it.
    I have seen one method of accessing in C++ client sample ,
    which implements Queryinterface function...takes the IID_Unknown as input and returns interface pointer(inhereted static_castof the required class, uses static_cast for that) as output.
    when i try to follow up the same in c , i am lost  with the inheritance concept.
    In short i need to send IID Unknown to the Queryinterface function and should get the interface pointer of message box type or other class type ...
    Sorry for the long mail,Please guide me
    Thanks in advance ,
    Satish

  • Java mapping how to use com.sap.tc.logging

    Hi I would like to know how to use logging within a java mapping.
    I know i have to use theese classes : Location, Category, ConsoleLog but i dont know how.
    1) How to load the P1, P2, P3 and P4 tags in the Error tag of the SOAP header watched in SXMB_MONI
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">STREAM_TRANSFORMATION_EX</SAP:Code>
      <SAP:P1>SwissMedical/Interfaces/IFI002/LiquidacionMapping~</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Java mapping of application triggered an exception</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    2) How to load and activate log in the DIAGNOSTIC tag of the SOAP Header.
    - <SAP:Diagnostic xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:TraceLevel>Information</SAP:TraceLevel>
      <SAP:Logging>Off</SAP:Logging>
      </SAP:Diagnostic>
    Thanks!!

    As already suggested, you can display custom messages using AbstractTrace.
    trace = (AbstractTrace)param.get( StreamTransformationConstants.MAPPING_TRACE );
                        trace.addInfo("G1-CYCLE is missing");
    For more on coding front refer:
    http://help.sap.com/javadocs/NW04/current/pi/com/sap/aii/mapping/api/StreamTransformation.html
    To get this trace seen in MONI, set parameter TRACE_LEVEL in SXMB_ADM to 2.

  • How to Use Com ports on oracle forms

    Hai,
    how we can use com port to communicate to the device like Pole Display(output device) or fixed scaneer (input device) having serial port(Input device) in oracle forms.
    Thanks & regards

    For web forms you will probably need to create a PJC and/or use webutil and make calls to the device's API.

  • How to use an instance instead of the class itself

    I am building a program but have a problem.
    My program uses a controller class which instantiates a World-class. In the world class has a Vector I make a Vector in which I place all the elements in the world. (I also made an Element class from which all the objects that I put into this Vector extend.)
    Everything except for some methods in the controller class are declared public. I might need to use static, but I do not know how.
    // CONSTRUCTOR CONTROLLER CLASS
    world = new World ();  // instantiate one and only one world
    world.newElement (new Beamer ("beamer", 20. , 20.));  // use a selfwritten method to add a "Star Trek"-like
                              // beamer to the world. I give it a name and position.
    world.newElement (new Avatar ("avt", "beamer"));  // add an avatar which is "beamed up". so what I do is that I use the beamer for the beginposition of the avatar. However, and this is my problem, in the constructor of Avatar (see below) i need the beamer in world, but my compiler cant find world. I probably need to import my World or controller class, but even then: I do not understand how to use an instance (world is an instance. I cant use the World-class as the class does not contain the beamer element)
    public class Avatar extends Element {
         public Avatar (String n, String beamer){
              name = n;
              posx = world.named("beamer").getPosx; // the selfwritten method named finds the
                // element in the Vector that goes with the name. Any ideas to make this code better are welcome too.
              posy = world.named("beamer").getPosy;
    } Any ideas on how to solve this (common) problem in good coding are most welcome.

    I think you are best off if you use static methods and static fields only in your World class. That way you don't have to instantiate it and everyone has access to its methods. This would be then completely analogous to how you access methods and fields of the well-known class System (e.g. when you use System.out.println). This also has the advantage that you are guaranteed to have only one copy of the World.
    Here is an example of how your World class, Avatar class and main code would look like.
    Main code: (note the use of capital W in the name World, referring to class rather than instance).
    // no need to instantiate World, as we call its static methods only
    World.newElement (new Beamer ("beamer", 20. , 20.));
    World.newElement (new Avatar ("avt", "beamer"));  // add an avatar which is "beamed up". World class: (note the static keyword in front of the vector and the methods)
    public class World {
      private static Vector v;       // static field, only one copy of it ever exists
      public static void newElement(Element e)   // static method, can call without instantiating world
         v.addElement(e);
      public static Element named(String n)  // use to look up elements
         ... some code which goes through v and finds element named "n" ...
         ... return reference to that element ...
    }and finally the Avatar: (again note the use of reference to World as a class rather than instance)
    public class Avatar extends Element {
         public Avatar (String n, String beamer){
              name = n;
              posx = World.named("beamer").getPosx;
              posy = World.named("beamer").getPosy;
    } The above example is how I would implement it when you don't actually need instances of the World class.

  • I don't know how to use my nokia PC Suit in my com...

    I downloaded a PC suit in my computer and I dont Know how to connect to my N7610

    Use the USB cable to connect the Phone to PC and then open OVI Suite.. When the phone is recognised by the interface.. click on various menus to see the functionalities..
    --------------------------------------------------​--------------------------------------------------------​--------------------------------------------------​--If you find this helpful, pl. hit the White Star in Green Box...

  • How to Use COM Component in a Java Bean

    Dear Sir,
    How can I use a COM Component in a Java-Bean . I am having a COM Component for reading Weighment Reading on a Serial Port and want to use this Component in a Java-Bean . I would also like to call the methods of this COM Component inside my Java-Bean . COM Component is a dll file .
    Please guide me how to go ahead . If possible kindly provide some sample code for the same .
    With Thanks and Regards
    B V Mittal

    You need a Java to COM bridge like Jacob. Try searching this forum for more information, I've answered this question several times before.
    Dom.

  • How to use com.bruceeckel.swing

    Im trying to execute some code that comes in bruce eckel�s thinking in java, but it imports com.bruceeckel.swing, and the compiler (eclipse) doesnt know where the package is located. How do i use those classes that come with the book? where do i have to place them? please, anyone who�s gone trhu this, please explain

    Im trying to execute some code that comes in bruce
    eckel�s thinking in java, but it imports
    com.bruceeckel.swing, and the compiler (eclipse)
    doesnt know where the package is located. How do i
    use those classes that come with the book? where do i
    have to place them? please, anyone who�s gone trhu
    this, please explainDownload the class files or their source code and add/import them into your project in Eclipse.

  • How to use a specific MIDI controller to control instruments loudness?

    Hi, I just started using Logic, so it's possible I will find the answer to this question by myself over time, but maybe somebody can point me to the answer right now...
    I want to control the loudness (volume) of a software instruments over time, for a given note, using a MIDI controller channel. The note velocity only controls the loudness of the attack.
    Of course this is not applicable for an instruments such as the piano, but it is quite important for string or wind instruments where you can attack a note very softly but keep playing louder on the same note.
    The MIDI controller to control that could be after touch. In my case, it would be CC2 (breath control), as I use a wind controller.
    My experiment so far is that Logic sees the value of CC2 correctly, but whatever its value, the loudness of the note sound never changes.
    I understand that the answer to that question might depend on the instrument under consideration. Then an example would be of great help.
    Many thanks.
    JD

    Jean-Denis Muys wrote:
    My experiment so far is that Logic sees the value of CC2 correctly, but whatever its value, the loudness of the note sound never changes.
    As it was suggested you can try CC11 or you can transform your existing CC2 to CC11. Patch a transformer between the Physical Input and the Sequencer Input in Click & Ports Environment layer and make the next settings in the transformer:
    Conditions
    Status=Control
    Data Byte 1 (= 2)
    Operations
    Data Byte 1 (Fix 11)
    It this scenario your incoming CC2 will be transformed into CC11 and you can control the Expression (CC11) of a software instrument if it responds to that controller at all ( some software instruments must be mapped previously to have such respond ). Note you will be able to control only the selected track this way.
    You can try to use the Controller Assignment dialog and learn CC2 to control the "level" parameter of an instrument or its channel strip level fader, gainer plugin (which can be inserted in the top plugin slot) etc as well.
    !http://img59.imageshack.us/img59/4967/aglogo45.gif!

  • How to use COM component in Forms 6.0 ??

    Dear All,
    We are developing Retail-Chain s/w and have a 3rd party s/w for credit card and
    they give a .dll (not a ordinary dll ), .tlb file and sample VB code to integrate the 3rd party s/w.
    Now i want to do the same task in my application using Forms 6.0.
    Here is the sample code for VB :
    ' Sample VB code for invoking Plutus from VB-based ECR application
    Private Sub Command1_Click()
    ' This is called when "Pay by card" is pressed in ECR application
    Dim strIO As String
    Dim lTrackingID As Long
    ' Add PlutusExchange v1.0 Type Library (TLB) as reference to the project
    Dim plutObj As New PlutusExchangeLib.ExchangeObj
    lTrackingID = 6 ' For testing, enter the scenario number as given in interchange spec doc
    strIO = "T123,156" ' This is input to Plutus -- base amount in paise for Rs. 1.56 and ECR bill number: T123
    ' Bill number is only used for printing on Plutus chargeslip
    plutObj.PL_DoTransactionEx lTrackingID, strIO
    MsgBox strIO, vbOKOnly, "Plutus Response String"
    ' Parse this string to extract Plutus response. Only indication of successful transaction authorization is a valid auth code returned in response
    End Sub
    Plz. reply.
    Note: I already register the .dll file and it showing in import OLE option under Forms 6.0.
    Thanks
    Debabrata
    Message was edited by:
    Debabrata Guchhait

    You need a Java to COM bridge like Jacob. Try searching this forum for more information, I've answered this question several times before.
    Dom.

Maybe you are looking for

  • I cant getmy new IPAD to connect to the wifi at my apartment.  how do i get a prompt to enter a username and password?

    I just purchased a new IPAD (16GB + 4G cell)  I am trying to get it to connect to the wifi hotspot at the apartment where I live.  The wifi signal requires a username and password.  How do I get the IPAD to prompt for the username and password?  Any

  • Setting default page in Interactive Report Dashboard (Version 9.3.1)

    Does any one know how I can set the default page (to be the first page) in Hyperion Interactive Report Dashboard version 9.3.1? I have a report with dashboard that returns 56 pages (and the user scrolls down to page 8 of page 56) and selects a filter

  • Java NIO - UDP packets

    I'm curious as to the rationale behind having a DatagramPacket class and just using ByteBuffers for TCP connections. I can see the logic, but I'm trying to write a Java framework wrapping NIO with TCP and UDP connections. In my C++ version I have one

  • What music format should I choose for a download?

    I am new to downloading music and haven't used iTunes. I bought a track at theclassicalshop.net and it is now asking what format I want to download it in: WMA, WAV, AIF. I don't have a clue which one. Then in another part of the screen I have a choic

  • Object []toArray()

    okay, i just frankly don't really know what this is , but i would like to make an object array from my linked list.I looked in the API documentastion, but i jsut didn't understatnd it. How would i write a method that would make an arry of the a linke