I’ve been setting up a 2018 MacBook Pro for Java development. It’s running Mojave 10.14.1 – just like the older machine I’m migrating from, an early 2013 MacBook Pro. I installed Java 1.8.0_192 and immediately noticed that I could not launch jars or any Java app that had a UI on this m…
Wrong values from string empty test (java x kotlin)
I’m having a super weird behavior from a code that I was testing. The test I wrote was to see the behavior of the class if the Android returned an empty package name. After some debugging, I found this (consider that packageName is empty): Is this expected? Can someone tell what the deal with this? ps1.…
QuickSort descending order
I am trying to implement QuickSort in a descending order. I have tried to trace through my code to see why it is only partially-sorted. My input was an int array of: {3,4,6,1,9,7}. After sorting, I got {9,4,7,6,3,1}, where 4 is not in the correct place. Answer Your code should look something like this:
Spring boot CLIENT_PLUGIN_AUTH is required
I have my app working fine on local, but when I tried to connect to remote server I get this error: CLIENT_PLUGIN_AUTH is required. Answer I got it. Step 1. Create an user on remote mysql server and grant all privileges. Step 2. Change datasource url Step 3. Change pom.xml mysql Check that version is changed …
upload file size limit in spring boot
In version 2.1.0, spring.servlet.multipart.max-file-size property failed to bind org.springframework.util.unit.DataSize. Exception Answer As Michael & Stahorszki mentioned “B” must be capital In Yaml
@Generated annotation using gradlew + dagger
I’m confronting a weird issue using gradlew(4.10.2) + dagger(2.18). The problem is when I call: The build fails with: Task :Common:compileDebugJavaWithJavac FAILED /CommonModule_ProvidesGsonFactory.java:6: error: package javax.annotation.processing does not exist import javax.annotation.processing.Gener…
Gluon reusing view and populating prefeably using a protected event hook
In Gluon you register a view factory, Gluon uses this to create a view when needed. You then switch a view using: If you are on the SelectView and want to go back, you can use this: Now to the problem: after going to SelectView, back to the previous, and then to the SelectView again, Gluon decides not to crea…
Visual Studio Code: Formatting Java method chaining
I’m trying to change the VSCode settings which will allow me to do something like this with method chaining : The problem is whenever the formatter is applied, it changes it back to just one line: I have the Java Extensions Pack installed, which includes the ‘Language Support for Java by Red Hat&#…
Is there a maven repository to quickstart Java 11 app
There is a quickstart maven archetype for Java 7, as I can see here: https://maven.apache.org/archetypes/maven-archetype-quickstart/ The problem with this is when I fire this command: Enter project directory and fire this command: I get this error: Please note that there is some problem with my JDK install, a…
How to query a Hierarchical Category tree entity with undefined depth
I have created a hierachy structure or a tree structure for a shopping site using springboot. My problem is how to query such a structure when looking for a specific product and its parents: This is what i have done, any pointers on what i need to do on the entity to achieve this structure and also how i can