Results 1 to 9 of 9
  1. #1
    PzK
    PzK is offline Member
    Join Date
    Dec 2008
    Posts
    4
    Rep Power
    0

    Default package mj does not exist

    Hi, i've got a problem with my java on my laptop.

    Im currently trying to compile some java apps that use import mj.*;

    They work fine on the uni computers however they dont seem to work on my laptop and come up with the error 'package mj does not exist'.

    Any help would great since this assignment is in for the morning.

    Thanks
    Oli

  2. #2
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    6

    Default

    is mj a custom package? make sure you have the jar files located in your java folder and if their on a website try importing the whole thing. mj.whateversite.thingyouneed

  3. #3
    PzK
    PzK is offline Member
    Join Date
    Dec 2008
    Posts
    4
    Rep Power
    0

    Default

    I believe you need the import mj.*; to create a canvas application. So i dont think its a custom package.

  4. #4
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    6

    Default

    Java 2 Platform SE 5.0 that Canvas? Try importing java.awt.Canvas and see if that works

  5. #5
    PzK
    PzK is offline Member
    Join Date
    Dec 2008
    Posts
    4
    Rep Power
    0

    Default

    src\test.java:10: class, interface, or enum expected
    importing java.awt.Canvas.*;
    ^
    1 error

    came up with that

  6. #6
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    6

    Default

    import is the command. not importing. also make sure the import is outside your class (not sure if that makes a difference but thats how I see every program)

    Also I don't think anything is beneath Canvas so it would just be import java.awt.Canvas;

  7. #7
    PzK
    PzK is offline Member
    Join Date
    Dec 2008
    Posts
    4
    Rep Power
    0

    Default

    woops, i edit now.

    : package mj does not exist
    mj.Canvas canvas = new mj.Canvas("Car Display Application");

    Get that error. I've got no idea what to do :(

  8. #8
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    cross-posted: here

  9. #9
    xcallmejudasx's Avatar
    xcallmejudasx is offline Senior Member
    Join Date
    Oct 2008
    Location
    Houston, TX & Flint, MI
    Posts
    609
    Rep Power
    6

    Default

    just remove mj. I honestly have no idea what it is and I can't find it on any of the JDocs

    Canvas canvas = new Canvas("asdfdsa"); will create a new Canvas object

Similar Threads

  1. Replies: 0
    Last Post: 09-18-2008, 05:07 PM
  2. Return onyl 1 MX record if numerous exist
    By rlzyoner in forum New To Java
    Replies: 1
    Last Post: 08-05-2008, 11:41 PM
  3. JXL Package
    By gaya3 in forum Java Servlet
    Replies: 1
    Last Post: 05-23-2008, 09:03 AM
  4. Replies: 3
    Last Post: 11-03-2007, 01:58 PM
  5. Replies: 2
    Last Post: 07-02-2007, 06:48 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
  •