Link to home
Start Free TrialLog in
Avatar of dkamdar
dkamdar

asked on

how to copy standard packages manually in folders?

Hi from where can I obtain the package org.w3c.* and manually copy the class files in i guess following hierarchy
folder x -> folder org -> folder w3c -> compile respective java files in respective folders.

actually i need to run a code that imports org.w3c.*

i know it comes with Java 2 but i cannot install it as i dont have admin privilages on this machine. Getting those and getting newer Java installed will take me a decade :)

Please help!

Thanks
Avatar of brunomsilva
brunomsilva

what exactly do you want from w3c? write the import statements here.
Avatar of CEHJ
You can't practicably
Avatar of dkamdar

ASKER

import org.w3c.dom.*;
import org.xml.sax.*;
import org.xml.sax.ErrorHandler;

I also need
import javax.xml.parsers.*;

same code has it.
dkamdar,
As CEHJ already said - even if you have them, this won't help... they need other classes from the packages and so on... It is impossible without having the whole packages.

Venabili
Hi dkamdar,

As far as your question goes...why would you want to? You just add the appropriate Jar containing class files which you need to your build path.

If you download the Xerces XML parser from http://xml.apache.org/xerces2-j/download.cgi , you'll get all the interface definitions (the org.w3c.* packages) plus the Xerces XML parser collection (actual implementations of the interfaces mentioned earlier)

\t
>>If you download the Xerces XML parser ...

You might try that, but don't expect the result to maintain binary compatibility with other Java binaries that use the same classes but incorporated into the sdk.
Avatar of dkamdar

ASKER

hey orangehead,

how can i do that ... can you please elaborate?

Thanks
dkamdar,

Are you using an IDE like Eclipse or Netbeans for your development?

If you're using Eclipse, you just right-click on your project and select Properties from the pop-up menu which appears. In the window for project properties, click on Java Build Path, the click "Add external jars" and select the jars which you downloaded in Xerces.

\t
Avatar of dkamdar

ASKER

unfortunately i am not using any IDE.
I am compiling it using command-line option

secondly i just downloaded a zip file  Xerces-J-bin.2.6.2.zip  does it have the .jar files?
i dint see any jar files. Whats the difference between jar and tar? they have tar.zip files on the download site but no jar files.

finally what would be a good resource to get started with eclipse ... i mean like an online detailed tutorial. I tried many "getting started"s but they are just not good enough.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Tommy Braas
Tommy Braas
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dkamdar

ASKER

thanks orangehead911,

I have not tried your method as i compiled the program in my home machine with Java 2.
But i have learnt a lot about this compilation process.
These points are for that "Never Say Die Attitude!"  :)

Thanks
My pleasure!