How do i import Java packages and classes from elsewhere?
I am currently exploring the expansion of my app through Java and JavaActions. The work I am wanting to do is bigger than a simple method or function within a JavaAction and I need to be able to include my own classes. I can see that in the files generated by Mendix it imports the mendix Java libraries. How do I go about creating my own libraries and including them when in my JavaActions?
You can put jars in the userlib folder, or create extra java files in the javasource/yourmodulename/ folder.
Does that work for you?
Michiel is absolutely right about using the userlib folder and javasource/yourmodulename/ folder.
A great example to give you an idea of how this works is the Community Commons module. The source is on GitHub and shows you how to use these folders to bring in extra files and functionality.