Category "java"

KeyListener does not handle keystrokes java

I'm creating a game with a level constructor.According to the idea, the player creates a level with the mouse, places the robot, cargo and loading location, and

I want my batch file to execute my jar file in PowerShell and not cmd?

I made a .jar file for my little Programm that works in the Terminal. I also made a bat file to open my jar file automatically however it opens my jar file in t

How Do I Create A Daily Excel Export In Azure?

I am moving a legacy application to the cloud and need guidance on breaking it up. There is a Java application that creates reports/statements out of a database

When should I use Comparator vs Comparable?

I have a list of POJOs I need to sort somehow. I define a Comprator inside the POJO class and use it to sort the list. Is the following way correct/best practic

Can we make folder inside template package of SpringBoot Application?

I have been working on dummy Web application, and there are lot html file in template which I want to organize. I am getting an error when I have keeping them i

Java -> operator

I know that -> is used for lambda expressions with the syntax ()->{}. But I saw this code: file -> file.isFile() - with no () and {}. What does it do?

List View Constrain jump to top

I am trying to learn SQL database with a tutorial. I add user and age to database and get them back and displayed using listView using ViewAll button then if

What is a NullPointerException, and how do I fix it?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause

Get pixels of a recyclerView item

I'm wondering if it's possible to get the pixels of an item of a recyclerView, let's say I have an horizontal recyclerView and all the items are the same size (

How to deserialize this dynamic keys JSON to Java custom Pojo using Jackson

I have a pretty complex json string that I would like to deserialize into custom Java Pojo, but Im not so sure how to do it. Here is the json: { "A": {

Show screen before another app starts in android studio

I'm doing an app that blocks the access to another apps when you have used them for an specific time, for example Facebook. So, my idea is to show a screen when

Hibernate XML Entity Mapping

I have simple definition of my entities, but what i do wrong, because i can not get any entity UserInfo and receive only error (could not load an entity: [UserI

One JList/JCheckBox combination not working

I am doing an exercise in a book where you have to test event handling. I have a JList with 3 font choices (Serif, SansSerif, and Monospaced) and two checkboxe

How to encode the GWT Long value in RPC Request

I am using JMeter to generate random number for load test Q) How to encode the long value below "DI"? The original value is 200. 7|0|8|http://10.6.3.1:90/portal

Java - How to replace entire 2D ArrayList with another that has different size

I have 2D ArrayList consisting of Objects, i pass it to a function in another class, like this: public void function(ArrayList<ArrayList<Object>>)..

Every bean/class instance created twice in spring boot application

I'm using java based configuration, using only @Component and @Scheduler Annotation in my other classes, but I don't know why all classes in class path loaded t

Parse JSON Array from an api in java

I have an api that gives me this json array. How do i just get specific key value pairs for traceId? these are traces generated by zipkin but i want to store th

Modeling a 4x4 Grid for Simple Game Using Looped ArrayLists in Java

I am meant to create a game in Java that specifically uses looping Arraylists to create a 4x4 grid. I have a Grid class, made up of an ArrayList of 4 Rows, a Ro

How to convert KML to GeoJSON using GeoTools in Java (GeoServer don't accept the result of my conversion)

I have a KML File and I need convert to GeoJSON. I am using Geotools in Java for convert KML because GeoServer has problems to import KML. I can convert the fil

JavaFX Maven shaded jar fails to open on double click but can run from terminal

This is the Maven shaded plugin I'm using in my pom.xml: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>mav