Java: Finding out what is using all the memory
I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse. ...
I have a java application that runs out of memory, but I have no idea which code is allocating the memory. Is there an application with which I can check this? I use Eclipse. ...
I've looked through many of the existing threads about this error, but still no luck. I'm not even trying to package a jar or use any third-party packaging tools. I'm simply running from within Eclipse (works great) and then trying to run the exact same app from the command line, in the same location it's built to (getting this error)....
Anyone who has done it recently? Can you give me some insights on the books, not many good ones out there. Truly appreciate it, Thanks. ...
Hello I have a org.w3c.dom.Node object. I would like to see if it has any other siblings. Here's what I have tried: Node sibling = node.getNextSibling(); if(sibling == null) return true; else return false; HOWEVER, for some reason (possibly due to identation or line spaces in the source XML) I am not getting the expected re...
Consider the Java code below, what would happen if there were no paintComponent method in JPanel class? ... import javax.swing.JPanel; public class ShapesJPanel extends JPanel { public void paintComponent( Graphics g ) { super.paintComponent( g ); //more codes here } } ...
I have basically the same problem outlined in this question, however I am using Microsoft Access as a database instead of MySQL. The result of which is that SQL_CALC_FOUND_ROWS doesn't seem to be available to me. Believe me, I want to switch, but for the moment it is out of the question. I have a query that aggregates a number of ro...
We have a Spring + Ibatis based J2EE app. I planned to wrap around our DAO's (which call iBatis templates ...by getting spring beans) with test cases. I don't have much experience with JUnit so I thought that simply making an object of my DAO and then calling one of the methods will work. But wrong I was, turns out that the whole J2EE ...
I recently asked a question about controlling the volume of a Java audio clip and it was suggested that I try JMF. As I'm using an old JVM (1.4) and only interested in playing WAV files, JMF was a perfect solution and has greatly simplified the code to load, play and control the volume of audio clips in my application. But I'm having t...
My question is very much like http://stackoverflow.com/questions/1068974/getting-the-return-value-of-a-pl-sql-function-via-hibernate I have a function which does some modifications internally and it returns a value. The original idea was to do something like this: protected Integer checkXXX(Long id, Long transId) throws Exception { ...
I have an object "Instance" with another object "Course" inside. When trying to persist a new Instance object, I get the following error if Course is null: java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: null Here is my annotation for course: ...
We have a Java application which needs to communicate with a peripheral device over Virtual Serial COM port. We use the RS232 Java COMM API (javax.comm.properties, comm.jar, win32com.dll) to achieve the same. Currently the code works fine on Windows XP 32-bit, Vista 32-bit and Windows 7. However we are having a problem trying to communic...
hello, in a java webstart file (jnlp) you can specify the nativelib tag to load binaries. you can also specify toload different ones for different operating systems by also specifying the os attribute. for example: <resources os="Linux"> <nativelib href="....jar"/> </resources> <resources os="Windows"> <nativelib href="....jar"/> </...
I'm in a difficult position: We have a 3rd party enterprise system that exposes a Java-based API. However, we are a 100% .Net oriented development team. Essentially, I need to wrap the Java API with something that C# code can call. Web services would be great, but the only Java application server supported on our infrastructure is ...
Is it possible that anyone has a link to a graph class/library that I can use to produce a graph in Java? Thanks for any help! ...
I have a servlet that may return text/html or application/pdf content. Apparently, it looks like Internet Explorer (IE7) does not handle the application/pdf correctly. For example. Servlet Output A may return html content: [html content here] And then Servlet Output B may return PDF content: [pdf content here] The URL associated w...
I have a constantly-running Java program that needs to send an email whenever it encounters a problem. However it is possible that the mail server it uses could be down at the time it tries to send the email. What is the best way to ensure that the email will be delivered when the mail server comes back up? ...
Back in my ASP.NET days, I used URLRewriter.NET to do dynamic URL Rewrites. Basically, it's an HTTPModule that intercepts page requests and rewrites the URLs according to rules that you define, very similar to MOD_REWRITE. However, it also lets you define a "Custom Transform," a class with a single method that does URL translations for...
I'd like to apply a Median Filter to a bi-level image and output a bi-level image. The JAI median filter seems to output an RGB image, which I'm having trouble downconverting back to bi-level. Currently I can't even get the image back into gray color-space, my code looks like this: BufferedImage src; // contains a bi-level image Para...
I have an existing application that I am working w/ and the customer has defined the table structure they would like for an audit log. It has the following columns: storeNo timeChanged user tableChanged fieldChanged BeforeValue AfterValue Usually I just have simple audit columns on each table that provide a userChanged, and tim...
PMD has a way to ignore particular warning with //NOPMDcomment inside Java source file. Does Checkstyle have similar option? ...