Solved

how to copy standard packages manually in folders?

Posted on 2004-10-18
13
237 Views
Last Modified: 2010-03-31
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
0
Comment
Question by:dkamdar
  • 5
  • 4
  • 2
  • +2
13 Comments
 
LVL 4

Expert Comment

by:brunomsilva
ID: 12342182
what exactly do you want from w3c? write the import statements here.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12342192
You can't practicably
0
 

Author Comment

by:dkamdar
ID: 12342228
import org.w3c.dom.*;
import org.xml.sax.*;
import org.xml.sax.ErrorHandler;

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

same code has it.
0
 
LVL 20

Expert Comment

by:Venabili
ID: 12342314
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
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 12342425
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
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12342481
>>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.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:dkamdar
ID: 12342536
hey orangehead,

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

Thanks
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 12342600
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
0
 

Author Comment

by:dkamdar
ID: 12342911
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
0
 
LVL 14

Accepted Solution

by:
Tommy Braas earned 125 total points
ID: 12343380
dkamdar,

You need to expand the xerces zip file. It contains several directories with files in them. Inside the xerces directory you will find the jar files you need.

When you compile you need to add the xml-apis.jar to the class path, and when you run you will need to add at least two jar files to your path, xml-apis.jar and xercesImpl.jar.

\t
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 12343750
=-)
0
 

Author Comment

by:dkamdar
ID: 12343762
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
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 12343911
My pleasure!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java 1603 Error 3 50
Unable to open debugger port in Intellij idea 6 139
What is the latest versions eclipse neon 2 139
JDeveloper 12c for 32 bit 4 67
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now