Import classes from non-native package

N

Nick Paicopoulos

Hi all,

I am relatively new to Java though confident with the absolute basics. I've
been coding since early July using J2SDK1.4.2 but the lecturer at the
university is lecturing with JBuilder University Edition. I was able to do
all the activities at home with J2SDK1.4.2 up to the point where he
introduced the console package he developed himself containing the StringIO
and IntIO classes. I've downloaded the package from his website and placed
it in different directories in the j2sdk1.4.2 directory tree but any import
statement such as:

import console.*;
import console.StringIO;
import console.IntIO;

gives me a compilation error (StringIO or IntIO class cannot be found).

My question is: Where do I have to place the console package so that the
above statements will make use of it?

Many thanks,
Nick Paicopoulos.
 
M

Michael Borgwardt

Nick said:
My question is: Where do I have to place the console package so that the
above statements will make use of it?

Either put it in the jre/lib/ext subdirectory or (preferred) add it to the
classpath with the -cp command line argument.
 

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,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top