Results 1 to 18 of 18

Thread: J2me

  1. #1
    henna is offline Member
    Join Date
    Jan 2012
    Posts
    17
    Rep Power
    0

    Default J2me

    hello,
    actually i want to read a simple file and write it to a array. I have worked in java but j2me is completely new, can anyone please help me.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,863
    Rep Power
    19

    Default Re: J2me

    So.
    What happened when you moved the J2SE code, that you imply you understand, to your J2ME environment?
    Errors?
    Exceptions?

    The main thing I can think of is I think the Collections framework isn't on J2ME, so you'd need to use the older stuff (Vector, Hastable).
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    henna is offline Member
    Join Date
    Jan 2012
    Posts
    17
    Rep Power
    0

    Default Re: J2me

    The file handling techniques used in J2SE are totally different from J2ME, there are many errors.
    I cant get help online also., its becoming difficult..
    If anyone knows how to do it, please help..

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: J2me

    Moved from New to Java.

    Have you gone through the File Connection API (JSR 75)?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  5. #5
    henna is offline Member
    Join Date
    Jan 2012
    Posts
    17
    Rep Power
    0

    Default Re: J2me

    not yet, will go through it. Thank you.

  6. #6
    henna is offline Member
    Join Date
    Jan 2012
    Posts
    17
    Rep Power
    0

    Default Re: J2me

    thank you DarrylBurke, i used jsr 75 for firl reading.
    i have 1 more doubt i want to plot some points , but they are double and J2ME has normal integer functions, does any1 have any idea of how to plot double values in j2me?

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: J2me

    You can't *plot* fractional values on a screen that is composed of integral pixels.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  8. #8
    henna is offline Member
    Join Date
    Jan 2012
    Posts
    17
    Rep Power
    0

    Default Re: J2me

    but i did plot the same in j2se..
    ofcourse there is a way.

  9. #9
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: J2me

    Nope. You can fake it with anti-aliasing, but there are no sub-pixel coordinates on a screen.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  10. #10
    henna is offline Member
    Join Date
    Jan 2012
    Posts
    17
    Rep Power
    0

    Default Re: J2me

    okay....but a simple question can i draw a line of double values:
    like draw(double,double,double,double);

    i did this in j2se., but the same method is not working in j2me, but of course there is some method ...

  11. #11
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: J2me

    Java ME doesn't have anti-aliasing built in. If you want to fake it, you're going to have to write your own routines that determine the colors to apply to adjacent pixels to simulate sub-pixel positioning. But why bother?

    What specifically is your problem with drawing using integral coordinates?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  12. #12
    henna is offline Member
    Join Date
    Jan 2012
    Posts
    17
    Rep Power
    0

    Default Re: J2me

    mu problem statement is:
    i have to plot a ECG graph in j2me.
    the ECG values belong to double.

  13. #13
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: J2me

    So round them to int?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  14. #14
    henna is offline Member
    Join Date
    Jan 2012
    Posts
    17
    Rep Power
    0

    Default Re: J2me

    okay, but actually in my application accuracy matters a lot!..
    Thank you
    but if anyone gets a better idea please help..

  15. #15
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: J2me

    Accuracy? After all this discussion, are you still under the impression that you can draw to the screen at a point in between two pixels?

    Do you understand what a pixel is? Do you understand anything at all about how pixels are rendered to a screen? Think of a sheet of graph paper, in which you can shade any of the squares -- but nowhere in between. That's it.

    Also, J2ME and J2SE are outdated terms. The platforms are now known as Java ME and Java SE. And you might need to fix your <Shift> key to be able to program in Java. It seems to not work most of the time.

    db
    Last edited by DarrylBurke; 03-21-2012 at 06:00 PM.
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  16. #16
    henna is offline Member
    Join Date
    Jan 2012
    Posts
    17
    Rep Power
    0

    Default Re: J2me

    Mr DarrylBlurke,

    you are no 1 to question about my understanding!
    For your kind information
    Do you understand what a ECG signal is? Do you understand anything at all about how ECG values are?
    here's a example for you :
    Time voltage
    0.000 -0.145
    0.003 -0.145
    0.006 -0.145
    0.008 -0.145
    0.011 -0.145
    0.014 -0.145

    i had already tried rounding it off and plotting it.
    it gives a straight line between o and 1.

    there are live projects who have done it. I asked help, if you know do so, otherwise please leave the forum question unanswered.That's it.
    Good Bye.

  17. #17
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,863
    Rep Power
    19

    Default Re: J2me

    Then you need to define your scale on each axis.
    The final number you use will be an integer (a number of pixels) where each pixel represents a voltage (or time).
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  18. #18
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: J2me

    Quote Originally Posted by henna View Post
    Mr DarrylBlurke,

    you are no 1 to question about my understanding!
    For your kind information
    Do you understand what a ECG signal is? Do you understand anything at all about how ECG values are?
    here's a example for you :
    Time voltage
    0.000 -0.145
    0.003 -0.145
    0.006 -0.145
    0.008 -0.145
    0.011 -0.145
    0.014 -0.145

    i had already tried rounding it off and plotting it.
    it gives a straight line between o and 1.

    there are live projects who have done it. I asked help, if you know do so, otherwise please leave the forum question unanswered.That's it.
    Good Bye.
    Sure, throw a hissy fit. That won't get you fractional pixels though.

    And use proper words, don't pollute the forum with 'abbreviations' like "no 1" for no-one.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. J2me
    By vinay21987 in forum Threads and Synchronization
    Replies: 0
    Last Post: 05-05-2011, 09:35 AM
  2. Replies: 0
    Last Post: 04-22-2009, 01:30 PM
  3. J2me
    By Renjini in forum CLDC and MIDP
    Replies: 1
    Last Post: 08-14-2008, 10:58 AM
  4. J2me
    By kuttyniti@gmail.com in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 11-24-2007, 06:27 AM
  5. J2ME Webcam 0.1
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 10-31-2007, 05:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •