This weekend, someone asked me for help with a specific file. He has an Audi and wanted to upgrade his GPS maps. But all he has was an 8 KB downloader file with a JNLP extension. When opening the file, he gets an error that says that the extension is not recognized. First, I’ll give you Oracles explanation of JNLP: Java Network Launch Protocol (JNLP) enables an application to be launched on...
How to create a stream from an iterator in java 8
Hi guys! In this post I’ll show you how to convert a java iterator to a java 8 stream. The code is really simple: public static <T> Stream<T> iteratorToStream(final Iterator<T> iterator, final boolean parallell) { Iterable<T> iterable = () -> iterator; return StreamSupport.stream(iterable.spliterator(), parallell); } Just copy paste this static method in any class you like...
How to fix Unirest General SSLEngine problem
I tried to post data to a rest service using Unirest (unirest.io). But when I tried to post to an HTTPS url, I got the following error: javax.net.ssl.SSLHandshakeException: General SSLEngine problem PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target sun.security.provider.certpath...
How to create a vertx fat-jar with maven
If you use Vertx, It could be helpful to create a jar or war where Vertx is included. If you use maven. You can add the following code in your pom.xml: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>2.4.1</version> <executions> <execution> <phase>package</phase> <goals>...
How to enable CORS in Solr
If you are using Solr with Angular or something like that. The browser can be annoying about cross site scripting. To enable CORS in Solr you just have to add the code below in solr-x.x.x/server/solr-webapp/webapp/WEB-INF/web.xml (x.x.x stands for the solr version). Just after the <web-app> tag.
How to fix Fatal error compiling: invalid target release: 1.8
This tutorial is writen for mac users, on windows I didn’t have this error.
When I tried to do a mvn compile. I got the following error:
How to fix java.io.EOFException: Can not read response from server for MySQL
Hi, I made a java program where much database queries are processed in MySQL. After some time running, I got an error message:
How to unzip files in java
In this post, I will show you how to unzip a .zip-file in java.
How to add dummy data to your java object
When you are unit testing, it is sometimes necessary to supplement an object with dummy data. Unfortunately, to fill a large object manually, it crawls a lot of time and work. Fortunately, there is a tool that saves us the time and work!
How to fix jasperserver 5.5 parameter bug
In Jasperserver 5.5 the community version, it is not possible to schedule a report with parameters by a bug. In this post, I will tell you how to fix this bug.