External packages

I

I.L.B.

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 !!
 
M

Mike B

I.L.B. said:
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.
 
T

Tony Morris

I.L.B. said:
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
 
I

I.L.B.

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
 
T

thufir

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top