Including a Java .class file in IntelliJ project -


preface: realize there lot of other threads ask similar question using .class files library project, i'm still stuck after going through 10 different ways.

the project: teacher gave .class files (not jar) have methods need use in program we write. 1 of files book object, , other has static method called loadbooks() allows user enter info book , stores in array.

the issue: when made array of book objects, idea assumed trying use java library exists, , made import statement @ top .print.book;. learned wrong , deleted statement, leaving book array marked incorrect, , loadbooks() method call incorrect well.

my attempts: read on adding dependencies modules , whatnot... i've tried many different ways , nothing working. made new project in idea , copied on my program start over. downloaded fresh copy of teacher's .class files , left them in unzipped folder came in. went project structure > modules > my_project , added unzipped file java library. checked box appears next new "my_project classes" , pressed ok on project structures box.

now book object okay, , loadbooks() method call still not recognized. i'm point need step-by-step explanation.
please not link me javadocs, because i've read them , new helpful.

edit: here's error message when compile:

error:(32, 17) java: cannot find symbol   symbol:   method loadbooks()   location: class project8_mazzone 


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -