I have used Intellj to create a project(Spring, actually, but I found this problem to have nothing between Java project and Spring project) whose hierachy lies below:
- project_name
- src
- main
- java
- com.x.y
- controller_package
- controller_class.java
- model_package
- model_class.java
- controller_package
- com.x.y
- resources
- THIS.JAR
- java
- main
- src
I don't quite understand, as on the level of java directory, I could create a java class which could directly use the class within THIS.JAR, while the file within those packages, i.e., controller_class.java, I could not find the java class within THIS.JAR. In the former case, when I enter THAT_CLASS in THIS.JAR, the tooltip will pop up with Default package.
This.jar is a jar file created by myself from another project, I used Maven and pom.xml has been configured. This .jar contains some other modules like postgresql/antlr. But on both levels of java directory and controller_package I could import these modules. I have been searched around and found no solution. As a greenhand to Java, it has ruined my day and please, if there is someone who can help?