Include Java Archive in project

Hello,

In my project I am using MySQL Connector/J to access a database. The Java archive is stored in /System/Library/Java/Extensions (I am using OS X). On my computer the project is running fine without including the archive in my project. It seems that libraries in that directory are automatically included in Classpath. But when I give the project to a buddy I does not run properly, because the MySQL Connector/J archive is missing. Now want to include the archive. With every build it should be copied to the output directory. That way I would not have to worry about it anymore. How can I do that? Here is a screen shot of how I tried to add the archive to the project. Unfortunately the archive still is not copied to the output directory (although running it still works fine).

settings.png

How can I get this to work?

Thanks for your help.

1 comment
Comment actions Permalink

Hello,

the module dependencies are indeed don't copied to the output directory. If you want to run your application on another machine you can configure an
artifact (https://www.jetbrains.com/idea/help/artifacts.html), which will pack the class-files into a JAR file and include required dependencies.

--
Nikolay Chashnikov
JetBrains
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.