I’m trying to create a java class in my java project with Visual-Studio-Code. My project has structure like this
ProjectFolder
|_ src
|_ hust
|_ soict
|_ projectname
|_ aims
| |_ Aims.java
When I create Aims.java file, its package name has auto imported as “hust.soict.projectname.aims”. But my project is log an error as “Incorrect package”.
When i moved or renamed file or package (the package name imported again), the error disappeared.
How can i fixed this to have correct package name in first time create .java file ?
Tuấn Đạt is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.