Losing imports every time I deploy to Eclipse

0
Hello,   I'm trying to create Java actions in Eclipse, but every time I re-deploy from Studio Pro I lose all of my Java imports at the top of the file.   Many thanks!
asked
1 answers
0
  1. Make sure you are saving your changes in the correct location. The Java action file should be located under javasource > usermanager.actions in your Mendix project directory. After importing the project into Eclipse, you can find the source code file in the same location.
  2. Check if there are any conflicts with other libraries or packages. Mendix suggests dropping any required.jar files into the userlib directory and adding an empty file with the name of the jar file, appended with your module’s name and RequiredLib.
  3. Ensure that your Eclipse project points to the correct source directory (javasource) and not the compiled classes in WEB-INF.
  4. Update your Java development environment to the latest version of Java 11, as Mendix requires Java 11 for its Java actions.
  5. Import the project correctly into Eclipse by selecting "Import" instead of opening the existing project.
  6. Check your eclipse.ini file for the correct Java version and JRE path.
  7. Make sure you save your changes before redeploying from Studio Pro.
answered