Solved

IDE + Java + setting class path

Posted on 2003-10-28
9
667 Views
Last Modified: 2013-12-14
Im quite at a loss on how to set the classpath on netbeans IDE.

Ive checked netbeans documentaion but still puzzled.

I'm using netbeans to code a parser in java on windows 2000 and I have the Xerces parser jar files on my C drive.

How do I set the classpath for the Jar files ion netbeans IDE (a general answer, not specific to netbeans IDE may also be helpful).

Would be grateful for any hints

thanks

mm

0
Comment
Question by:mellowmoose
  • 5
  • 3
9 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 9633155
Put the Xerces libraries in all lib\ext directories
0
 
LVL 3

Accepted Solution

by:
savalou earned 50 total points
ID: 9637394
Actually, creating a directory called endorsed in the $JAVA_HOME/jre/lib  directory of the JRE you're using and moving the xercesImpl.jar and xml-apis.jar files there should do it.  

For NetBeans specifically, another way to add jars to your development (project) classpath is to mount the jars (right-click on filesystem and "mount archives").
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9640941
>>Actually, creating a directory called endorsed ...

Not sure why you'd do that. Wouldn't anything placed in ext be endorsed by definition?

>>For NetBeans specifically...

Of course, the generic solution is better

0
 
LVL 3

Expert Comment

by:savalou
ID: 9641815
> Not sure why you'd do that. Wouldn't anything placed in ext be endorsed by definition?

I don't know.  It says here (http://java.sun.com/j2se/1.4.2/docs/guide/standards/index.html) that org.w3c.dom.* classes should go in in the endorsed directory.

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:mellowmoose
ID: 9643519
>For NetBeans specifically, another way to add jars to your development (project) classpath >is to mount the jars (right-click on filesystem and "mount archives").

thanks savalou, that appears to have done the trick ...
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9643541
...but is not consistent with your requirement:

>>(a general answer, not specific to netbeans IDE may also be helpful).
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9643590
Also savalou, i'm not too sure that the Xerces libraries are endorsed, according to the list at the url you posted.
0
 
LVL 3

Expert Comment

by:savalou
ID: 9645841
> Also savalou, i'm not too sure that the Xerces libraries are endorsed, according to the list at the url you posted.

Why not?

It seems like the ext packages are those that have not made it into the core jar, usually they start with javax.

Endorsed packages are pretty much anything else that you want every time you use java on the machine and by everyone.  In a development project you might not want to throw any new jar you come across into the java directories.  

Anyway, whatever.  
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9651783
>>It seems like the ext packages are those that have not made it into the core jar

They are simply extensions to the standard libraries, either from Sun or third parties.

I would either read or re-read the url you posted ;-)
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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
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…

920 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

15 Experts available now in Live!

Get 1:1 Help Now