3

How do you import JAMA in java? I keep getting errors when I try to import it.

Anthon
  • 69,918
  • 32
  • 186
  • 246
Kat42912
  • 41
  • 1
  • 6
  • How are you importing it? What errors are you getting? The more specific you can get about your problem, the more specific we can be with answers. – yshavit Mar 31 '15 at 04:46
  • I guess you are using Jama-1.0.2.jar from this link http://math.nist.gov/javanumerics/jama/ just include that jar in your classpath and you would be able to use its packages. I hope you are using some IDE like eclipse. In that case go to project -> properties -> Java Build Path -> add external jar. will post my answer let me know its the correct jama we are talking about. – Bilbo Baggins Mar 31 '15 at 04:50
  • JAMA is a Java Matrix package – Kat42912 Mar 31 '15 at 04:55
  • Yeah, I'm using it from http://math.nist.gov/javanumerics/jama/ – Kat42912 Mar 31 '15 at 04:55
  • This is where I've put the package: file:///C:/Users/Gab/Pictures/Capture.PNG These are the errors I'm getting: file:///C:/Users/Gab/Pictures/Capture1.PNG I'm using eclipse btw – Kat42912 Mar 31 '15 at 04:58
  • I cannot see the files they are on your local file system. In order to show me place it on internet somewhere and then provide the link – Bilbo Baggins Mar 31 '15 at 05:02
  • This is where I've put the package: http://postimg.org/image/5cay4iwfv/ These are the errors I'm getting: http://postimg.org/image/dbn99fwrh/ – Kat42912 Mar 31 '15 at 05:18
  • that .zip will contain some .jar files keep those jar files there and try again, I am not sure the eclipse support and references java classes from .zip file. – Bilbo Baggins Mar 31 '15 at 05:26
  • Got it now, thanks Samwise Gamgee – Kat42912 Mar 31 '15 at 05:35
  • will post my answer please accept it – Bilbo Baggins Mar 31 '15 at 06:43

1 Answers1

2

In case if you are using the JAMA library from JAMA

In this case you need to extract the zip file and place it in the classpath of your project. If you are using eclipse then in that case goto Project(right click)-> Properties -> Java Build Path -> Library -> Add external jars. and select the jars that you want in the classpath of your project.

Bilbo Baggins
  • 2,899
  • 10
  • 52
  • 77