External packages

Discussion in 'Java' started by I.L.B., Nov 19, 2004.

  1. I.L.B.

    I.L.B. Guest

    Hi ,

    I got several source code Java files to compile... They import both standard
    java class libraries as "java.awt... etc" but also another private ones
    (included as external class files). When I try to compile with javac, it
    gives a lot of error because it cannot import the "special" class libraries.

    I got those class libraries as class files in a folder, but I don't know how
    to "install" them into my java in order that they're recognized when it
    comes to compile java files into class files.

    Thanks !!
    I.L.B., Nov 19, 2004
    #1
    1. Advertising

  2. I.L.B.

    Mike B Guest

    I.L.B. <> wrote:
    > Hi ,
    >
    > I got several source code Java files to compile... They import both
    > standard java class libraries as "java.awt... etc" but also another
    > private ones (included as external class files). When I try to
    > compile with javac, it gives a lot of error because it cannot import
    > the "special" class libraries.
    >
    > I got those class libraries as class files in a folder, but I don't
    > know how to "install" them into my java in order that they're
    > recognized when it comes to compile java files into class files.


    Put them in the same folder as your source code.

    --
    Mike B
    Mike B, Nov 19, 2004
    #2
    1. Advertising

  3. I.L.B.

    Tony Morris Guest

    "I.L.B." <> wrote in message
    news:cnlqcr$rut$-data.net...
    > Hi ,
    >
    > I got several source code Java files to compile... They import both

    standard
    > java class libraries as "java.awt... etc" but also another private ones
    > (included as external class files). When I try to compile with javac, it
    > gives a lot of error because it cannot import the "special" class

    libraries.
    >
    > I got those class libraries as class files in a folder, but I don't know

    how
    > to "install" them into my java in order that they're recognized when it
    > comes to compile java files into class files.
    >
    > Thanks !!
    >
    >


    Put the base directory of the classes on the classpath at compile-time using
    the -classpath switch.

    Also,
    http://java.sun.com/docs/books/tutorial/java/interpack/packages.html

    --
    Tony Morris
    http://xdweb.net/~dibblego/
    Tony Morris, Nov 20, 2004
    #3
  4. I.L.B.

    I.L.B. Guest

    I just get rid of this by including all the classes by importing
    "com.whatever.*" ...

    But then I get a lot of errors because it does not recognize user defined
    variables and functions that are supposed to be defined in that new imported
    pagkages, giving me errors like :

    " cannot resolve symbol: ... "

    Any ideas?

    Thanks
    "Tony Morris" <> escribió en el mensaje
    news:KFwnd.42225$...
    >
    > "I.L.B." <> wrote in message
    > news:cnlqcr$rut$-data.net...
    > > Hi ,
    > >
    > > I got several source code Java files to compile... They import both

    > standard
    > > java class libraries as "java.awt... etc" but also another private ones
    > > (included as external class files). When I try to compile with javac, it
    > > gives a lot of error because it cannot import the "special" class

    > libraries.
    > >
    > > I got those class libraries as class files in a folder, but I don't know

    > how
    > > to "install" them into my java in order that they're recognized when it
    > > comes to compile java files into class files.
    > >
    > > Thanks !!
    > >
    > >

    >
    > Put the base directory of the classes on the classpath at compile-time

    using
    > the -classpath switch.
    >
    > Also,
    > http://java.sun.com/docs/books/tutorial/java/interpack/packages.html
    >
    > --
    > Tony Morris
    > http://xdweb.net/~dibblego/
    >
    >
    I.L.B., Nov 20, 2004
    #4
  5. I.L.B.

    thufir Guest

    Given that Test16.java is in C:\java\source\, the package(s) needed are
    in C:\java\source\foreignPackages\org.w3c.tidy.Tidy and the .class
    files should go to C:\java\class\, then how does this source,
    <http://thufir.lecktronix.net/java/Test16.java>, compile with javac
    from C:\java?

    Absolutely this is a RTFM question, I'm looking for the FM ;)
    Thanks,

    Thufir Hawat
    thufir, Jan 13, 2005
    #5
    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. Paul  Smith
    Replies:
    0
    Views:
    718
    Paul Smith
    Nov 18, 2003
  2. Scott Allen
    Replies:
    8
    Views:
    10,904
    Scott Allen
    May 2, 2004
  3. David Lyon
    Replies:
    19
    Views:
    556
    David Lyon
    Apr 24, 2009
  4. Ian
    Replies:
    3
    Views:
    158
  5. Justin C
    Replies:
    1
    Views:
    86
    Justin C
    Mar 13, 2008
Loading...

Share This Page