Solved

IDE + Java + setting class path

Posted on 2003-10-28
9
665 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
Comment Utility
Put the Xerces libraries in all lib\ext directories
0
 
LVL 3

Accepted Solution

by:
savalou earned 50 total points
Comment Utility
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
Comment Utility
>>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
Comment Utility
> 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:mellowmoose
Comment Utility
>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
Comment Utility
...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
Comment Utility
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
Comment Utility
> 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
Comment Utility
>>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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

763 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

11 Experts available now in Live!

Get 1:1 Help Now