We have some memory leak issues on VMs in production which are running Java applications, the Old Gen heap usage grows fast every day, so I want to create heap dump to analyze it. However, I noticed that VisualVM will perform full GC before heap dump which will clean the Old Gen, in that case, the heap dump w…
Tag: java
How can I change option menu in different fragments?
I have a Fragment with menu: I would like to change menu but it doesn’t work and keep the old action menu Fragment B is equals like above with different inflate XML menu. EDITED: Can be useful to use different menu layout for different fragments and 1 menu layout for main activity and differents id Answ…
JOOQ pojos with one-to-many and many-to-many relations
I am struggling to understand how to handle pojos with one-to-many and many-to-many relationships with JOOQ. I store locations that are created by players (one-to-many relation). A location can hold multiple additional players who may visit it (many-to-many). The database layout comes down to the following: W…
Why is there a class with entity name plus an underscore for JPA entity class
I am new to JPA, I have created a class like the following I noted that there is another class with name as my entity java class Programme.java with an underscore i.e. Programme_.java. What is this class and why is this generated. Is there any way that I can stop its generation? the code for the Programme_.ja…
android countdowntimer tick is not accurate
I am using a countdown timer for audio notification… and it’s not accurate from the start… using initial parameters I can see in the log that the initial countdown is correctly set to 180000 but the next one should be 120000 and it’s set to 119945 !!! This is quite annoying as the audi…
cannot access org.apache.commons.pool2.impl.GenericObjectPoolConfig class file for org.apache.commons.pool2.impl.GenericObjectPoolConfig not found
I’m writing a daemon for getting servers stats for some game. In compilation I’ve get a message: cannot access org.apache.commons.pool2.impl.GenericObjectPoolConfig class file for org.apache.commons.pool2.impl.GenericObjectPoolConfig not found At this line of code: Answer Add the required librarie…
How can I see the output console result in Netbeans?
I am a beginner studying Java using NetBeans. I created my first class and some simple code: Why don’t I see any result when I click run? I am supposed to see hello world but nothing like this is shown. Only a message BUILD SUCCESSFUL (total time: 0 seconds) Unfortunately, I can’t post images yet …
What is difference index.html vs index.jsp? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 8 years ago. Improve this question One URL ends in ‘index.html’. Another URL ends in ‘index…
Android: Cannot perform this operation because the connection pool has been closed
I was reading through StackOverflow about this question and I still haven’t found a solution. I notice that sometimes, my app throws this error: I have a file called DatabaseHelper.java using this approach to get an instance of it: Then I have methods like this one (that it crashed in the line cursor.mo…
MySQL select and update table at same time
I want to select a value one by one from my MySQL table and using this value get some value from different table. After getting the value I want to update my same table with this value. Can I select and update the table at the same time? I want to use Java to loop the table selecting values one