0

Running multiple java files which are dependent?

i have two java files in a folder {'myclass.java','file.java'} myclass.java contains the main method and in myclass.java i am creating an instance of file.java. 1.) I am compiling both the files to create .class files linked with both files 2.) calling the myclass.java using java myclass.java but this is giving an error saying can't find symbol file what should i do to make it run The directory in which both classes are in is already added in environment variables CLASSPATH

27th Aug 2020, 11:51 AM
Bhavuk Sharma
Bhavuk Sharma - avatar
3 Answers
+ 2
```„$€``` You have to import others class package.
27th Aug 2020, 12:19 PM
AÍąJ
AÍąJ - avatar
0
A J but these are in same directory
27th Aug 2020, 12:30 PM
Bhavuk Sharma
Bhavuk Sharma - avatar