Math libs for J2ME

Hi!
I need to do float calculations in J2ME.
anybody knows any existing customized classes to replace java.lang.Float and java.lang.Math ?
but such that wont cause loose of precision in the float calculations.
thanks

See my experience : http://forum.java.sun.com/thread.jsp?forum=50&thread=138662
It's so simple to reintroduce float and double, mathlib etc. only thing required : having the
correspondant libraries with C compiler on your specific hardware.
Regards.

Similar Messages

  • Missing libraries for j2me?

    Hi!
    I have source code for Jess (java expert system) written in J2SE that I am trying to compile for J2ME. Of course, I keep getting compilation errors, since J2ME does not have e.g. java.util.Iterator or java.io.Serializable. What can I do (if anything?!) to solve this problem? Jess folks do not have a mobile device version. Are there additional libraries for J2ME I could download and happily compile my code? Thank you, I am really stuck with this!
    -Buso

    Hi Buso,
    I am not sure if its a good solution, but you can try it as follows :
    Use the source code that comes with Java SDK (src.zip in sdk ), extract the classes (and their dependant classes) to a different folder, compile them and make your own jar file. Keep this Jar file in in WTK's Lib folder.
    I suppose this should work.
    Cheers
    Sudarshan

  • How to set classpath for J2ME

    how to set class path for j2me. I downloaded J2ME Wireless tool kit. And set the classpath "set classpath=c:\J2mewtk\lib\midpapi.zip;.;". but i could compile java file. .how to set.
    With regards
    Santhosh

    When you are downloading j2MEWTK, everything is included within it. You dont require MIDP seperately. When you are runnung the ktoolbar , which is provided with J2mewtk, the preverifier runs and creates the required jad file for you. You dont need a forte to run these.
    If you want to download MIDP seperately, that also is possible. Then you have to go for command line arguments. Please refer to Sun's MIDP page for details.
    Let me know, if you face any further problem

  • Read a text file(database) from a servlet for j2me..?

    Anyone know how to read data from a text file as a database using a servlet for j2me..?
    How to do it..?
    Thanks in advance.

    i tried something like that but there is a NullPointerException... Is what i'm doing correct..?
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class LoginServlet extends HttpServlet {
      private static final String db_server = "localhost/";
      private Connection con = null;
      private String content="";
    public void doPost(HttpServletRequest  request,
                         HttpServletResponse response)
        throws ServletException, IOException
        response.setContentType("text/plain");
        PrintWriter out = response.getWriter();
        String strUserid = request.getParameter("userid");
        String strPassword = request.getParameter("password");
        System.out.println("userid received: " + strUserid);
        System.out.println("password received: " + strPassword);
         try{
                   System.out.println("opening the file....");
                   //String url = "file://"+dbServer+"test.txt";
                   //String uri = "file://localhost/test.txt";
                   String uri = "file://Program Files\Apache Group\Tomcat 4.1\webapps\Project\WEB-INF\classes\trial\test.txt";
                   //String uri = "file:/database/res/test.txt";
                   System.out.println( uri );
                   InputConnection conn = (InputConnection) Connector.open( uri,Connector.READ );
                   System.out.println("connection established");
                   InputStream in = conn.openInputStream();
                   int ch;
                   conn.close(); // doesn't close input stream!
                   System.out.println( "Contents of [" + uri +"]" );
                   while( ( ch = in.read() ) != -1 ){
                   System.out.print( (char) ch );
                   in.close();
                   catch( ConnectionNotFoundException e ){
                  System.out.println( e.toString()+"File could not be found!" );
                  System.out.println( "File could not be found!" );
                   catch( IOException e ){
                       System.out.println( e.toString() );
                   catch( Exception e ){
                       System.out.println( e.toString() );
          out.close();
        } // End try
        catch (Exception e) {
          System.out.println("Exception in doPost(): " + e.getMessage() );
      } // End doPost
    } // End loginServlet

  • Where on the Mac can I find the math symbol for Pi. Ie. what is the Unicode number for Pi.?

    Where on the Mac can I find the math symbol for Pi?
    Ie. what is the Unicode number for Pi.?
    I am using system 10.6.8
    Jubbjubb.

    Jubbjubb wrote:
    Where on the Mac can I find the math symbol for Pi?
    On the US keyboard layout, alt/option + p = π

  • Validating XML parser for J2ME?

    Hello,
    does anybody know a validating XML parser for J2ME?
    Thanks
    Volker

    I mean the XML parser.
    I want to know if there are XML parsers which can validate a XML document against a DTD or Schema
    Thanks
    Volker

  • Adobe reader for j2me needed!

    I need a PDF reader for j2me (java mobile phones).
    There is MobilePDF from zesium but it doesn't work for complex PDF's.
    I vote for a j2me version original from Adobe.

    Let me try this again ...
    The Adobe download is an msi installer which sends you to a web site to get the rest
    of the ~40MB file. If you don't have Internet access you cannot download the file.
    The computer I want to install it on has no Internet access, therefore I need the app
    in a form I can install by itself.
    Don't ask why the computer has no Internet access.
    rs

  • How to Change String back to math symbol for calculation??

    Hi,
    How to Change String back to math symbol for calculation to achieve this coding. it's for a for loop
    int a;
    String sym0 = "+";
    String sym1 = "-";
    String sym2 = "*";
    String sym3 = "/";
    for (int i=0; i<=3; i++)
    a = 45 sym0 74;
    }

    There is no method to achieve this...aa far as I am aware of.

  • Where's the API docs for J2ME?

    I'm a long time J2SE programmer wanting to get into J2ME> One of the first things I tried to do is find Sun's javadoc for J2ME, but I can't find it anywhere. How can I find them? Also, are there any good learning trails for learning the basics of the J2ME windowing system and such?

    http://java.sun.com/j2me/docs/index.html
    or you can search in
    http://jcp.org/en/home/index
    by JSR
    http://java.sun.com/j2me/index.jsp

  • Math functions for dates

    Hello,
    Have you ever used a math function for dates (MMDDYYYY) not just a number? I'm looking to send an email out based on date field. For example, if someone's contract expires on 1/1/2016, I'd like to send them out emails 30, 152, 212 and 335 days before that date. Right now, we have fields set up for those 30, 152, 212 and 335 days and would like to know if there's a math function that would automatically fill them in dynamically based on their contract exp. date.
    Thanks for your help and suggestions.

    rmabrey wrote:
    I have the calculator working but I am having trouble figuring out thow to do a square root function, nth factorial, absolute value, and Fibonacci. java.lang.Math.sqrt()
    nothing for factorial - write your own.
    java.lang.Math.abs()
    nothing for Fibonacci - write your own.
    %

  • Are Palm OS or Pocket PC viable markets for J2ME?

    Hi,
    On the current issue of JDJ, there is an article called "J2ME: Has it time finally arrived?" where the author talks about how J2ME is becoming more mature on the cellphone market. But then the author says:
    Again, we're talking mobile phones here -- PDAs running Palm OS or Pocket PC just aren't a viable market for J2ME development as of yet, because they have alternative programming tools and languages and generally more open platforms.
    Is this true? Judging from personal experience, plus threads in this forum like Open letter to SUN to produce a JRE for Pocket PC, there seems to be some truth to this claim.
    I would like to hear other developer's opinions on this. Has your company abandoned Java development on Windows CE (or Pocket PC) and moved to .NET Compact Framework instead? Or is your company perfectly comfortable with using Java under those environments, except for a few hiccups? Why or why not?
    Thanks,
    Nicolas Rivera

    Hi Nicolas,
    Is this true? Judging from personal experience, plus
    threads in this forum like Open letter to SUN to
    produce a JRE for Pocket PC, there seems to be
    some truth to this claim.Unfortunately there not exists a supported free JVM for Pocket PC 2003
    devices, there exists some commercial implementations but I haven't found a truly RAD tool to develop java apps for this platform.
    I've suffered with pain the old embedded Visual Basic and Visual C environments from Microsoft for mobile devices and I'm suffering the Compact Framework. They've created an acceptable tool like Visual Studio but it's not much better than alternatives with Java.
    I can't believe Sun would have surrender to Microsoft in this apps market but I think they've done it.
    >
    I would like to hear other developer's opinions on
    this. Has your company abandoned Java development on
    Windows CE (or Pocket PC) and moved to .NET Compact
    Framework instead? Or is your company perfectly
    comfortable with using Java under those environments,
    except for a few hiccups? Why or why not?Our company began to work with MS because there was a great experience in MS desktop apps developing with Visual Basic and Visual C++.
    I've heard of some companies developing Java apps in a PC environment and then deploy them in PocketPC by using only the right subset of classes.
    Hope this helps.
    Kind regards
    Jose Luis
    Hi,
    On the current issue of JDJ, there is an article
    called "J2ME: Has it time finally arrived?" where the
    author talks about how J2ME is becoming more mature
    on the cellphone market. But then the author says:
    Again, we're talking mobile phones here -- PDAs
    running Palm OS or Pocket PC just aren't a viable
    market for J2ME development as of yet, because they
    have alternative programming tools and languages and
    generally more open platforms.
    Is this true? Judging from personal experience, plus
    threads in this forum like Open letter to SUN to
    produce a JRE for Pocket PC, there seems to be
    some truth to this claim.
    I would like to hear other developer's opinions on
    this. Has your company abandoned Java development on
    Windows CE (or Pocket PC) and moved to .NET Compact
    Framework instead? Or is your company perfectly
    comfortable with using Java under those environments,
    except for a few hiccups? Why or why not?
    Thanks,
    Nicolas Rivera

  • SAP Java lib for SOAP: is there any chance to use HTTP-compression?

    We use 3rd party web service in java, they plan to use HTTP-compression to save the bandwidth. At the moment I have no idea how to turn it on in SAP Java libs for SOAP.
    Any help will be appreciated.

    Hi Kirill,
    HTTP-compression is something, which occurs at the HTTP protocol level (transparent and below the SAOP protocol) and is controlled by HTTP protocol headers.
    To enable HTTP-compression, you will "somehow" have to manipulate the http layer of the SAP SOAP stack.
    Good starting point to look for further information is the NWDS help. Use the search topics "header compress".
    Regards
    Gregor

  • Basic Documentation for J2ME MIDP?

    Hi,
    I am new to developing for J2ME/MIDP and have not been successful in finding any language documentation to help me further my knowledge.
    As a case in point, I have a sample app that I have been playing with, it is very simple and uses an object of type TextBox as follows...
      private TextBox t;
        t = new TextBox("Heya!",  "Welcome to MIDP development", 256, 0);Now I want to append some more text to this TextBox at from another method in the app, but I can't find any documentation on TextBox to show me how to do this.
    (I have tried "t.append(new StringItem(null, "More text"));" but it doesn't work).
    Where is the documentation for MIDP? Is there something similar to the J2SE documentation here -
    http://java.sun.com/j2se/1.4/docs/api/index.html
    If there is, then that would be the answer to a lot of my questions!
    Also, I have difficulty understanding how MIDP and J2ME relate, what is their relationship? Is MIDP a part of J2ME? And how does CLDC relate to them both?
    Well, thanks very much for any help you can offer!
    Warm regards,
    - Peter

    The documentation is part of the SDK when you download it.
    If you downloaded the Wireless Toolkit or any other SDK, there should be a docs directory there with all the documentation (and if you don't have any SDK you can't do much development in any case).
    As for the TextBox issue you would need something like:
    t.setString(t.getString() + " some more text");And about those general J2ME questions, there's a good FAQ on this site.
    shmoove

  • Open source, object-oriented embedded database for J2ME

    For J2ME-based devices that require embedded data management, there is now an open source, object-oriented embedded database for J2ME called Perst Lite.
    Perst Lite can be downloaded as part of the Perst open source embedded database package, at
    http://www.mcobject.com/downloads.php?step=2&catID=4
    Cheers,
    Ted

    Spam blocked. As this user has only ever logged in here to post spam, the user account is blocked for a year.
    db

  • SIP for J2ME API

    Anyone out there ever get the SIP for J2ME API (JSR-180) working on an actual device, like a PDA ?
    I can get it to run with the nokia emulator but other then that it's been pretty much useless to me.
    Would the full blown JAIN SIP API be better for high end PDA usage ?
    TIA
    Anoop

    Hi Anoop,
    Did you get the SIP application working on device. I am trying to run Wtk2.5 "GoSip" App on the device but didn't succeed but was able to run on emulator. While running on emulator I started the SIP server from File->Utilities and entered the local machine name as a proxy host and it ran successfully on emulator. Can you tell me what server to use, which proxy host to enter and what all other changes do I need to do while running the same example on the device. Or were u able to run any SIP application on device? Please help.
    Regards,
    Pankaj Hotwani.

Maybe you are looking for

  • Problem with f:setPropertyActionListener and f:ajax

    Hello, This is my first post to this forums. I am having some problems with the following scenario in JSF2: I have a h:dataTable populated with some items (ex. folders) and for each item I have a h:commandLink that is ajax enabled and has a f:setProp

  • Aperture upgrade failed 3.3.2

    Hi I tried to upgrade Aperture 3.3.2 after instaling Mountain Lion and the progress bar stops at approx 96% and will not complete.  Anyone have any proven fixes for this issue?  It is preventing other update installs until the Aperture upgrade is com

  • How to create rollback statements automatically

    Hi People I need to write a script which can generate the ROLLBACK statements for the IMPLEMENTATIONS(Create table, view, index, package, trigger etc Insert table, update table, delete table, Grant etc - which means that implementation could be anyth

  • Mysterious pictures appearing in the change backround option on the desktop

    This is upsetting because of course this pictures are ****. I can't find them anywhere and have checked hidden files too.

  • GRC 5.3+

    Hello, Someone at the office mentioned GRC 5.3+ today. Has anyone ever heard of this? Is it replacing sometihng? Thanks