[jdom-interest] help please
pauljakubik at yahoo.com
Wed Mar 14 08:33:23 PST 2001
Due to the way Java works, there is no magic to be
able to avoid an import statement. You would have to
go and edit the source code of all the JDOM classes so
they wouldn't be in a package anymore.
This would be a bad idea since JDOM uses generic names
like Document and Element.
An option that reduces the number of imports is to do
something like the following:
If you do that, you'll be able to use every JDOM class
without any additional imports. Of course, it won't be
obvious from your imports what classes you are using
from JDOM, and if you use this same style to import
from other libraries people reading your code will
have no idea which classes come from JDOM and which
come from somewhere else.
--- Hugh Mc Gauran <hugh.mcgauran at skynet.ie> wrote:
> well thanks to Paul Jakubik it now works
> all i had to do was add import org.jdom.Document; at
> the top and it
> what do i need to have in my classpath for this to
> be automagically in
> On Wed, 14 Mar 2001, Ian Lea stated:
> > Hard to tell much from this. Has the source got
> the correct import
> > statements? Or try changing line 16 to
> org.jdom.Document doc =
> > whatever.
> > What exactly is your classpath set to?
> > --
> > Ian.
> > ian.lea at blackwell.co.uk
> > Hugh Mc Gauran wrote:
> > >
> > > java 2 sdk v1.3
> > >
> > > On Wed, 14 Mar 2001, GB/DEV - Philip Nelson
> > > >
> > > > > cantona % javac InAndOut.java
> > > > > InAndOut.java:16: cannot resolve symbol
> > > > > symbol : class Document
> > > > > location: class InAndOut
> > > > >
> > > > > Document doc = b.build(new
> > > > > ^
> > > > > 1 error
> > > >
> > > > Appears to be a syntax error, but what version
> of java are you using?
> 25 Plassey Vge,Castletroy, Limerick.
> House Tel 061 337125 Mobile 086 8298 707.
> Email cantona at skynet.ie Web
> To control your jdom-interest membership:
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
More information about the jdom-interest