I’m able to use jmap command to dump JVM memory heap. The issue is, I have a program with heavier young gen GC activities compared to the previous version when checking from the GC logs, and when I ran memory profiler, the biggest objects are always the ones in the old gen. So it makes troubleshooting more difficult when you
Tag: java
how to make the Value “B” & “K” fill only certain number of cells Randomly
I have board made from class in Java with values (K, L) that will randomly fill the board. I wonder how to make the value “K” fill only certain number of cells (8 cells) randomly and the rest “L” would fill the board. My aim is to get a board where “K” appears 8 times and the rest would be
Gradle: Exclude file from resourses and add it from different folder
I am trying to build a jar file with Gradle. I have some resource files (like log4j2 and persistent.xml) into the src/main/resources that I want to exclude when I was built the jar, on contrary I have the same files (with different content in a project directory) and I want to copy these files rather than the src/main/resource files. Into
Use a secondary h2 database for testing an API in Spring boot
I’m developing an API to manage a database in the company where I work, the problem is that when I have to run the different test I have to use the “real” dev database (in h2) where I have some real data. I thought about it and what I wanted to do is create a new h2 database that could
How to use org.springframework.messaging.converter.ProtobufMessageConverter
I was trying to use Spring framework built-in ProtobufMessageConverter to convert my kafka message but I couldn’t seem to find a way to have this converter being used. The configuration of my binding is as the following: When I use my custom message converter, I can see it registered in SimpleFunctionRegistry.messageConverter which is a list of customer converter and default
Is there any way to just pass a “user” object instead of all the variables of user
I have a login page, and right now after the user logs in I pass all of its data like the username, password and etc. I wanted to know if it’s possible that I just pass like a whole user and it that user object I can just use getter and setters to get the user-related info. I am working
How to write dates in Apache POI which would be filtered properly
I have a block of code which write data to .xlsx file. I need to write some date in “dd.MM.yy HH:MM” format. All is work properly, but when I try to open result file and test filter work, I got issue with that. Filter perceives dates just like strings, instead of dates, and I can’t get filter with year and
WindowBuilder 1.9.5 not showing design tab after re import project
After several test I found that this that I did previously in another project is not working. In fact, a project I worked on a few months ago shows me this error of not showing the design tab. Create SWT/JFace Java Project Add Swing designer->JFrame The desing tab is visible Remove project from workspace Import the project The desing tab
IllegalArgumentException at MetamodelImpl.java gradle build error
I keep on getting a IllegalArgumentException at MetamodelImpl.java and I am not sure what is causing it. I pulled a brand new Spring project from start spring io just with basic Web, Lombok and JPA dependencies. I tried building it with gradle doing ./gradlew clean build and it keep throwing this error. Here is my build.gradle: and my gradle wrapper.properties:
How to pass value from a fragment/activity to xml?
So I know data can be passed using intent between activities and fragments, but is there a way to pass the value to some XML files? Say, I have the name and email from the login page, and I can pass it from from loginActivity to mainActivity (navigation) panel, but is there a way to pass it to strings.xml in