Results 1 to 13 of 13
  1. #1
    sknn is offline Member
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    0

    Default package java.text does not exist

    Hi!

    I am developing an application in which I need java.text package, but I'm getting this error: package java.text does not exist. Does anyone know where can I download that package so that I can include it in my project library?

    Thank's in advance...

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    You say that you need that package. So you must know what that package do. Why I'm asking is, seems to me it's just a package someone written on his/her project. Not a common one package to use all of us.

    Don't you have any information about that package. At least about the project.

  3. #3
    dom1000ca is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    *ahem*

    Java 2 Platform SE v1.3.1: Package java.text

    It's there, but I don't have it either. I'm tempted to wonder why, as it seems rather useful.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,091
    Rep Power
    20

    Default

    Um, it does exist, otherwise I wouldn't be able to use (for example) SimpleDateFormat without having to add another jar to my list. And I don't have to do that. It's part of rt.jar, which is the core java classes.

    I don't know what you're trying to do, but this error isn't down to mssing jars, unless you're using some non-standard version of Java.

  5. #5
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    841
    Rep Power
    6

    Default

    How come?

    Its a part of java run time env...check ur system whether u are having jre or not?
    Ramya:cool:

  6. #6
    dom1000ca is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    I definitely have the JRE 6, and I can manually add a couple of related .jar files to get it, but none of my JDEs can find it automatically which is rather annoying. I'm actually missing quite a few of the standard packages.

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,091
    Rep Power
    20

    Default

    OK, then what are the version of the JRE that are failing?
    Are they Sun JREs?

  8. #8
    dom1000ca is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    Well the original JRE was the one already present on this file system. I'm having these issues at work, so I had no control over the initial setup of the computer. I installed the latest JRE from Sun and seem to be experiencing the same issue. I'd stick with just importing the proper .jar, but while the works for Eclipse the BlackBerry JDE 4.7 doesn't agree with them.

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,091
    Rep Power
    20

    Default

    Ohhhhh!
    It's ME!

    You should have said.
    Everything (OK, slight exagerration) is optional in that, and also mobile/PDA specific. You'll have to look at the Blackberry site for a JDK to use when writing this stuff for one of them.

  10. #10
    dom1000ca is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    I have the BlackBerry-specific JDE, as well as the Eclipse plug-in, but neither contain the packages in question. My issue is that I'd like them to XD. How do I allow for Java SE packages in an ME environment? (I should point out I did not know that this wasn't SE until you mentioned it) I have to do a fair bit of hex manipulation for my current program, and this wouldn't be much of a problem except that Java defaults to scientific notation, which eventually causes a NumberFormatException when I do a few conversions.

    Example:

    double lat = 47.2134256
    String temp = Double.toString (lat * 1000000);
    //Note: lat * 1000000 = 47213425.6
    // Java displays this as 4.72134256E7
    temp = lat.substring (0, 8);
    //contents of temp: 4.721342, not the intended 47213425
    temp = Integer.toHexString (Integer.parseInt (temp));
    //NumberFormatException from the ParseInt, because the String is not an int

    I want to use a DemicalFormat object to remove the scientific notation, but Java.Text.* cannot be resolved.
    Last edited by dom1000ca; 02-03-2010 at 03:10 PM.

  11. #11
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,091
    Rep Power
    20

    Default

    I don't think you can.
    Some of the code inside some of these packages may well be native, in which case you are definitely stuffed. Or use code which is native. Never mind being compiled in a different environment. Yes, SE is write once run anywhere, but ME is (from what I've read) a different beast. Write once, run, fiddle a bit, run elsewhere.

  12. #12
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,091
    Rep Power
    20

    Default

    Most ME (if not all ME, to be honest) doesn't have Collections, I believe.

    You'd do best asking at the Blackberry forums...there must be a developer forum.

  13. #13
    dom1000ca is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    There certainly is. I wasn't aware this was a mobile problem, so Google lead me here lol. Thanks for the help mate. I do have a work-around for the above problem, but a NumberFormat would be more efficient, and certainly less convoluted than what I came up with.

Similar Threads

  1. Replies: 3
    Last Post: 12-12-2008, 12:12 PM
  2. package mj does not exist
    By PzK in forum New To Java
    Replies: 8
    Last Post: 12-03-2008, 10:30 PM
  3. java package for ISDN
    By syedumairali in forum Networking
    Replies: 0
    Last Post: 01-20-2008, 08:11 PM
  4. Java Package help?
    By Bibendum in forum New To Java
    Replies: 2
    Last Post: 12-12-2007, 04:29 AM
  5. Replies: 3
    Last Post: 11-03-2007, 01:58 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
  •