I want to create two packages: the one containing problem-specific classes and methods and the one containing some typical mathematical apparatus. I will denote them "maxim.main_package" and "maxim.algebra". For some reason I can't import the algebra package to the main one. Please, help.
As the algebra package does not rely on the main one, I have successfully compiled the .java file into a .class via the command line. The .java file starts with "package maxim.algebra;". Now I want to compile the main .java file which starts with "package maxim.main;" followed by "import algebra.*;" The paths to the .java files with are resp.:
1) maxim\main\main.java
2) maxim\algebra\algebra.java
I run "javac maxim\main\main.java" command from maxim directory.
It fails saying:
`error: cannot access Algebra
Algebra.matrix3x3 R = Algebra.some_method(parameters)
bad class file: .\algebra\Algebra.class
class file contains wrong class: maxim.algebra.Algebra`