how to make an applet load user-defined package?

Discussion in 'Java' started by Mark_Galeck, Oct 26, 2008.

  1. Mark_Galeck

    Mark_Galeck Guest

    How to have an applet load user-defined package?

    I have packages in their own directories, and the applet compiles and
    links with them, by use of CLASSPATH env variable. But when it comes
    time to run, it ignores that and does not know where the classes (in
    the packages) are.

    If I don't use packages and put all code in one directory, runs fine.
    If I use an application, I can link with and load my packages.

    I know applets can't use things like CLASSPATH for security reasons,
    but still, they should be able to be compiled out of several packages,
    why do I have to put all code together??

    Mark
     
    Mark_Galeck, Oct 26, 2008
    #1
    1. Advertising

  2. Mark_Galeck

    Roedy Green Guest

    On Sun, 26 Oct 2008 14:30:13 -0700 (PDT), Mark_Galeck
    <> wrote, quoted or indirectly quoted
    someone who said :

    >I have packages in their own directories, and the applet compiles and
    >links with them, by use of CLASSPATH env variable. But when it comes
    >time to run, it ignores that and does not know where the classes (in
    >the packages) are.


    put your class files in a jar. Classpath does not apply.
    See http://mindprod.com/jgloss/jar.html
    http://mindprod.com/jgloss/applet.html
    --
    Roedy Green Canadian Mind Products
    http://mindprod.com
    A vote for McCain is fearful clinging to McSame.
    A vote for Obama is a shot at Obamalot.
     
    Roedy Green, Oct 27, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gerrit Hulleman
    Replies:
    7
    Views:
    1,028
    Roedy Green
    Jun 30, 2004
  2. Krista
    Replies:
    3
    Views:
    2,319
    Andrew Thompson
    Sep 15, 2004
  3. Oodini
    Replies:
    1
    Views:
    1,776
    Keith Thompson
    Sep 27, 2005
  4. Mark_Galeck
    Replies:
    1
    Views:
    772
    Knute Johnson
    Oct 26, 2008
  5. SamuelXiao
    Replies:
    2
    Views:
    1,361
    SamuelXiao
    Jan 21, 2011
Loading...

Share This Page