Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2009
    Location
    DKI Jakarta, Indonesia
    Posts
    10
    Rep Power
    0

    Default The import java.security cannot be resolved??

    Hi All,

    I created new Project for my BB, and I had to code for security database inside.
    I used:

    import java.security;
    import javax.crypto;
    import javax.crypto.spec;

    but none of them cannot be resolved.

    Where could I find that jar files?? Anyone had links or suggestions for me??

    Any help would be appreciated

    -Harrie-

  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 cannot import a complete package like this.

    import java.security;
    The way to import the complete package is...

    import java.security.*;

  3. #3
    Join Date
    Dec 2009
    Location
    DKI Jakarta, Indonesia
    Posts
    10
    Rep Power
    0

    Default

    i m sorry, i just misspelled. i used this packages to my BB app.:

    import ianywhere.ultralitej.*;
    import java.security.*;
    import javax.crypto.*;
    import javax.crypto.spec.*;

    i didn't have any trouble with the ianywhere package, but the java.security and javax.crypto give me troubles. it showed:

    "The java.security cannot be resolved"
    "The javax.crypto cannot be resolved"
    "The javax.crypto.spec cannot be resolved"

    Does anyone know how to get out from this problems??
    Where could I find that jar files??
    Any link or something to help me??

    Any help would be appreciated

    -Harrie-

  4. #4
    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

    This is not a standard Java package.

    import ianywhere.ultralitej.*;
    Do you have that package with you? If so, just added it into the Java class-path. The error message basically says that VM cannot find the package you specify.

    Did you copied this code segment somewhere, may be on the web? If so there should be an explanation about those resources.

  5. #5
    Join Date
    Dec 2009
    Location
    DKI Jakarta, Indonesia
    Posts
    10
    Rep Power
    0

    Default

    Thank Eranga,

    I copied this from Sql Anywhere help.
    I knew what the meaning of those errors.
    I had the ianywhere package, but i didn't have the java.security and javax.crypto package.
    What I really want here is where I could find those package files??
    I hope I get some links from this thread to download those files :(

    Any links for me please??

  6. #6
    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

    Which JDK version you've. java.security introduce from the JDK 1.1, it's a default package.

    Comment the line import ianywhere.ultralitej.*; and see what's happening.

  7. #7
    Join Date
    Dec 2009
    Location
    DKI Jakarta, Indonesia
    Posts
    10
    Rep Power
    0

    Default

    I had JRE 6u17 and Eclipse 3.4.1 Ganymede (which I downloaded from RIM site, included BlackBerry JDE)

    I had browsed in my folder, and I get these files:
    org.eclipse.equinox.security.ui_1.0.0.v20080603-1810
    org.eclipse.equinox.security.win32.x86_1.0.0.v2008 0529-1600
    org.eclipse.equinox.security_1.0.1.R34x_v20080721

    Is one of these files similar to java.security?
    I m still newbie in java, need more explanation

  8. #8
    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 cannot use JRE, stand for Java Run time Environment, for the developments lol. As the name implies it's provide platform to run the java applications on your machine.

    To do the development on Java you must have to install JDK version, you can download from the Suns' official download page.

    I don't know that Eclipse comes with a JDK bundle, as far as I know it's not. You have to link it manually after the IDE installation.

  9. #9
    Join Date
    Dec 2009
    Location
    DKI Jakarta, Indonesia
    Posts
    10
    Rep Power
    0

    Default

    I downloaded full Eclipse installer from this site:
    BlackBerry - BlackBerry JDE Plug-in for Eclipse

    And I followed "Download the Full Installer"

    Maybe the JDK had been included in BlackBerry JDE 4.5, and some of the standard package is not included.

    I guess I have to download new JDK.

    Thanks Eranga
    Last edited by Harrie_KalaChakra; 01-20-2010 at 09:34 AM.

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

Similar Threads

  1. Error - "The import org.junit cannot be resolved"
    By Jessaurum in forum New To Java
    Replies: 7
    Last Post: 11-03-2009, 03:20 AM
  2. Eclipse "import not resolved" package problem?
    By spamsickle in forum New To Java
    Replies: 3
    Last Post: 08-24-2009, 11:44 AM
  3. Java security
    By Zosden in forum Java Applets
    Replies: 43
    Last Post: 08-02-2008, 02:10 PM
  4. Replies: 1
    Last Post: 07-23-2007, 11:59 PM
  5. The import java.util.Scanner cannot be resolved
    By Heather in forum Advanced Java
    Replies: 1
    Last Post: 07-08-2007, 01:05 AM

Posting Permissions

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