How do I import jars into my java program?

前端 未结 13 1536
自闭症患者
自闭症患者 2021-01-04 12:52

I\'ve downloaded two jars. I want to import some of their contained classes. How do I do this?

It\'s for my algorithms class. I\'ve tried following the instructions

13条回答
  •  失恋的感觉
    2021-01-04 13:34

    I wasted a lot of time with importing the class, tried the CL option of "javac -cp .;stdlib.jar mad.java" etc but used to get the same error you mentioned.
    I then commented out the import altogether and made sure the DrJava's preferences had the 2 classpaths added + the %CLASSPATH% variable to have the right value. Is simply works now. Good luck!

提交回复
热议问题