pez
pez

Reputation: 4235

How to import from this library, NetBeans, Java

I'm trying to import the BigDecimalMath class into my current project. I created a new library by going to Tools -> Libraries -> New Library. I called the library BigDecimalMath, as you can see below. I added a new JAR/Folder and then selected the download from Cornell's website, here. Direct download.

Library screenshot

I'm unsure of how to import it into my class now. This library is part of my current project. I've tried import org.nevec.rjm and some other things, but I think I'm doing something wrong. Any advice appreciated. Thanks!

Upvotes: 0

Views: 238

Answers (1)

Elliott Frisch
Elliott Frisch

Reputation: 201447

You appear to have a source version of that library. Your window displays a jar containing org.nevec.rjm.BigDecimalMath.java. I think you need to download a binary version of the jar and add that to your class-path. Then you would import that one class with,

import org.nevec.rjm.BigDecimalMath;

or the entire package with,

import org.nevec.rjm.*;

Alternatively, you might be able to build the library from your src jar.

Upvotes: 2

Related Questions