Results 1 to 7 of 7
  1. #1
    artemff is offline Member
    Join Date
    Dec 2009
    Posts
    41
    Rep Power
    0

    Question import javax.microedition.io.file.*; - error

    On string:
    import javax.microedition.io.file.*;
    next error is appeared:
    package javax.microedition.io.file does not exist
    Java: j2sdk1.4.2
    What is the matter with this? I need class: FileSystemRegistry.

  2. #2
    ortollj is offline Member
    Join Date
    Oct 2009
    Posts
    10
    Rep Power
    0

    Default

    Hello
    I'm interested on the response because, I got similar error with
    the source code of PasswordStore
    downloaded on
    java.sun.com/docs/books/tutorial/ui/overview/demo.html

    import javax.jnlp.BasicService;

    what hell is javax package ?

  3. #3
    Pixio is offline Member
    Join Date
    Apr 2010
    Posts
    3
    Rep Power
    0

    Default

    Javax is an extension for java package and is included in java (lang).
    Swing can't be used in MIDlets, because it's created for Window-apps.

  4. #4
    deyakhuzaa is offline Member
    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Default

    yep
    i got similiar error with "import java.net.*"
    and this's the error code after i compile those things "package java.net does not exist".
    i already knew that's because i use "java" and "java.microedition" at the same time.
    the question is, how do make those things work properly together?
    *sorry for my bad english :p

  5. #5
    RightGoodEnt is offline Member
    Join Date
    Feb 2011
    Posts
    3
    Rep Power
    0

    Default

    That's quite the bump you got here,
    It seems to work absolutely fine on my computer with Net Beans, so It does exist. If you're a patient man, you can try re-downloading java, or maybe trying out Net Beans.
    Last edited by RightGoodEnt; 04-05-2011 at 03:36 PM. Reason: Didn't realise the date of the topic. He's probably resolved this by now.

  6. #6
    Dark-Redd is offline Member
    Join Date
    Oct 2011
    Posts
    19
    Rep Power
    0

    Default Re: import javax.microedition.io.file.*; - error

    Quote Originally Posted by artemff View Post
    On string:
    import javax.microedition.io.file.*;
    next error is appeared:
    package javax.microedition.io.file does not exist
    Java: j2sdk1.4.2
    What is the matter with this? I need class: FileSystemRegistry.
    Hi,

    For the simple reason that you qualified the package is the problem, i.e.
    Java Code:
    import javax.microedition.io.file.*;
    if you are to import like that you must remove the trailling ".*". What I mean is the "file" class has no children inheriting from it hence its the last. you should try importing it like this
    Java Code:
    import javax.microedition.io.file; or import javax.microedition.io.*;
    That should work with no hiccups. Good luck

    Regards
    Dark-Redd

  7. #7
    javamenewuser is offline Member
    Join Date
    Jan 2013
    Posts
    1
    Rep Power
    0

    Default SOLUTION: import javax.microedition.io.file.*; - error

    I had the same problem with Java ME SDK 3.0. It's a matter of which packages your selected device in the project supports.

    This SOLUTION worked:
    1. open the properties of the project
    2. go to the "Platform" section
    3. change the device to any device, for example "DefaultCldcPhone1". Please, NOT "DefauldCldcJtw...".

    Now, in the list of optional package in the same window, you see more packages and also the "File Connection and PIM optional packages 1.0".

    Good luck

Similar Threads

  1. Import error for csv file in outlook
    By nida in forum New To Java
    Replies: 5
    Last Post: 09-07-2012, 01:22 AM
  2. Replies: 4
    Last Post: 10-30-2009, 07:54 PM
  3. javax.microedition.io/ javax.bluetooth
    By ahtiven in forum New To Java
    Replies: 3
    Last Post: 01-13-2009, 02:54 PM
  4. can't import javax.servlet.*;
    By makpandian in forum Java Servlet
    Replies: 1
    Last Post: 12-30-2008, 10:37 AM
  5. Replies: 1
    Last Post: 11-03-2008, 06:16 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
  •