IntelliJ – Import configuration from old version after first run

Starting with IntelliJ IDEA 2020.1 the settings are imported automatically from the most recently used previous version and the dialog is not shown. To start with the default settings you can use File | Manage IDE Settings | Restore Default Settings. Also note that default folders used by the IDE have also changed since 2020.1 … Read more

Checking Maven Version

Shorter mvn -v or mvn –version Output: Apache Maven 3.0.5 (…) Maven home: … Java version: 1.8.0_60, vendor: Oracle Corporation Java home: … Default locale: en_US, platform encoding: Cp1252 OS name: “windows 7”, version: “6.1”, arch: “amd64”, family: “dos” The other command (mvn -version) works because it starts with mvn -v. You can also try … Read more

Packaging jar is invalid Aggregator project need pom as packaging

To make things short: if your parent-aggregator project don’t contains source code (and it’s a good practice), just add this to your parent pom.xml: <packaging>pom</packaging> If the parent project contains source code, I strongly suggest you to: move this code in a new module (let’s call it commons) make commons a child module of your … Read more

How to set the -Xmx when start running a jar file?

Unfortunately, existing answers are wrong in one crucial point. -Xmx must be passed to the Java runtime environment, not to the executed jar. Wrong: java -jar JavaApplication.jar -Xmx1024m Correct: java -Xmx1024m -jar JavaApplication.jar More specifically, the java launcher needs to be used as follows: java [options] -jar file.jar [arguments] [options] are passed to the Java … Read more

Android Jar libraries

Google just release a new version of the SDK that handles Shared Libraries! https://developer.android.com/tools/projects/projects-eclipse.html#SettingUpLibraryProject ADT 0.9.7 (May 2010) Library projects: The ADT Plugin now supports the use of library projects during development, a capability that lets you store shared Android application code and resources in a separate development project. You can then reference the library … Read more

how can I debug a jar at runtime?

http://www.eclipsezone.com/eclipse/forums/t53459.html Basically run it with: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044 The application, at launch, will wait until you connect from another source. so the CLI command will be: java -jar yourJarFileName.jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044

How to reference a resource file correctly for JAR and Debugging?

Once you pack the JAR, your resource files are not files any more, but stream, so getResource will not work! Use getResourceAsStream. To get the “file” content, use https://commons.apache.org/proper/commons-io/javadocs/api-release/org/apache/commons/io/IOUtils.html: static public String getFile(String fileName) { //Get file from resources folder ClassLoader classLoader = (new A_CLASS()).getClass().getClassLoader(); InputStream stream = classLoader.getResourceAsStream(fileName); try { if (stream == null) … Read more

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