What is the difference between “Module Dependencies” and “Libraries” in IntelliJ IDEA?

Module dependencies are classes, archives, libraries and resources that your module files references. While a library is a set of class files stored in an archive or directory. Export check means if checked then this library will be implicitly added to the other module that references this one. To create a .jar file you need … Read more

JAR – extracting specific files

From the source: To extract only certain files from a jar file, supply their filenames: C:\Java> jar xf myFile.jar foo bar Using wildcards is a shell thing, and you should not expect it to work when extracting from a JAR file (which, as you’ve realized, is the case). What you can do, is supply a … Read more

Dependency error in jasper-reports from itext

A much simpler solution may be to upgrade to a newer version of jasperreports. Version 6.1.0 has this dependency on iText: <dependency> <groupId>com.lowagie</groupId> <artifactId>itext</artifactId> <version>2.1.7.js2</version> <scope>compile</scope> </dependency> No more “floating” dependency on iText, and it’s a version that’s custom made for jasperreports! See http://mvnrepository.com/artifact/net.sf.jasperreports/jasperreports/6.1.0 for the complete pom.xml.

running scala apps with java -jar

If you define -jar the -classpath is ignored: Java manual: -jar When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored. You can define the classpath dependencies in the Manifest metadata. The easiest way to start your app is using the scala … Read more

Gradle multiple jars from single source folder

I will post my working solution here as an answer (I’ve got a hint on gradle’s forum). The scopes in gradle are very strange thing 🙂 I thought that every task definition creates an object of some ‘Task’ class, which is something like ‘JarTask’ in this particular case. Then I can access any property of … Read more

Copy directory from a jar file

Thanks for the solution! For others, the following doesn’t make use of the auxiliary classes (except for StringUtils) /I added extra information for this solution, check the end of the code, Zegor V/ public class FileUtils { public static boolean copyFile(final File toCopy, final File destFile) { try { return FileUtils.copyStream(new FileInputStream(toCopy), new FileOutputStream(destFile)); } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)