I have a complex set of projects built by Gradle 4.10.3. I can build them from the command line, but I can also import them to IntelliJ 2018.3 Ultimate without major issues. When I upgrade my Gradle to 5.1.1, the projects are still building fine from the console, however I can no longer import (or refresh) th…
How to avoid “Sharing is only supported for boot loader classes because bootstrap classpath has been appended” warning during debug with Java 11?
Recently I switched to the Java 11 and start to debug my app and saw this message: OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended Found only this commit and ticket, but it doesn’t tell me much. Do I need to worry about it…
Using coroutines in a right way
I am implementing the coroutine for first time. I am following MVP pattern for a simple login app. Here is my code flow – The login button clicked will follow this direction – LoginFragment -> LoginPresenter -> Repository -> APIRepository -> RetrofitInterface The login response will fo…
Struts & Jersey Servlets with JSP & Webpack Front End
we currently have a struts 1.2 web application with casual JSP web pages. We want to migrate our application to Rest service web application with a webpack project front end. As this will be a migration process where old pages will be served under oracle weblogic server and new ones will be served under a dif…
jps command for Hadoop processes
there. I have hadoop 2.4.1 running on ubuntu. Executing jps command, I am getting this output: is it normal to get “3794 org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar” along with the output of jps? I am asking because didn’t get it before. Suddenly, it started to give this result wit…
How to limit multiple image selection from the gallery?
I have implemented adding multiple image selection from the gallery in my project. However, I want to limit the user so he/she can select only 3 images from the gallery. I have implemented selecting multiple images from the gallery like this: How can I achieve this? Thanks. Answer You can get the count of Cli…
SQLiteConstraintException:NOT NULL constraints android
I have a an Editor Activity where i insert my data in the database. I’ve created 3 columns as :- ID INTEGER, Task TEXT NOT NULL and Days TEXT. I insert data into the Task column with data from an edit text and insert other data into the Days column by creating an alert dialog containing an edit text. I&…
Why event loop uses more than one thread?
I always thought that asynchronous execution is about efficient resource utilization and thread safety, but today I ran into Netty’s strange behavior. public class Example { public static void …
handle duplicate key in Collectors.toMap() function
I am creating a map which its (key,value) will be (name, address) in my Person object: In the duplicate key situation, I would like to skip to add the second address to the map and would like to log the name also. Skipping the duplicate address I can do already using mergeFunction, but in oder to log the name…
Tomcat enable CORS: POST request from Safari returns 200, Chrome and Firefox return 403
I have backend running on Tomcat 8.5, Java Spring on Amazon EC2 instance. I make a POST request from my React app. The requests from Chrome and Firefox return 403, while the request from Safari returns 200 and the expected data. After some research I found out that I must add this code somewhere to enable COR…