I have a simple JTable, there are two columns that matter: quantity and value (Integers). Each time user enters a new row or updates one, each rows value must be multiplied by quantity, results sumed together and the result sum displayed in a JLabel outside the JTable. Looks pretty simple. Except that I have no idea what event should I l...
I'm still struggling with changing my Spring Application to use Hibernate with JPA to do database activities. Well apparently from a previous post I need an persistence.xml file. However do I need to make changes to my current DAO class?
public class JdbcProductDao extends Dao implements ProductDao {
/** Logger for this class and s...
Is there a way in monitoring cpu usage using purely java language?
if yes, can you please share some articles regarding this topic. thank you.
...
The title is the question....
...
Hi,
when I issue a kill -3 command to my java program, its generates the thread dump on the console. How do I redirect this to a file?
Tks!
...
I wanna create a single instance of my class.How can i create a single instance of a class.
...
Hi All,
I am trying understand about the size that a Java object will be allocated with when created using a new operator.
Consider that i am creating a class
`public class NewClass {
NewClass() { }
}`
when i create an instance of NewClass using NewClass nc = new NewClass();. what is the size of the NewClass that gets created in the...
I'm looking for a Java framework to help with some data mining specific to images. We have a set of historical images that I would like to categorize and classify. I'm was hoping to find something like weka http://www.cs.waikato.ac.nz/ml/weka/ or Marsyas http://marsyas.sness.net but more specific to sifting through image data to find p...
I'm building a Java application which will download a HTML page from a website and save the file in my local system. I'm able to manually access the web page's URL via browser. But when I try to access the same URL in my Java program, the server returns a 503 Error. Here's the scenario:
sample URL = http://content.somesite.com/demo/s...
I am trying to make a program that logs into a site and performs some automated activities. I have been using HttpClient 4.0.1, and using this to get started: http://hc.apache.org/httpcomponents-client/primer.html.
On this particular site, the cookies are not set through a "set-cookie" header, but in javascript.
So far, I am unable to...
The basic problem I have here is that I have one xml file that is being used as a utility file and imported into other xml files. It defines a series of objects for connecting to a platform and providing an interface to it. The beans in this file are defined to be lazy-initialised so that if you do not want to connect to the platform you...
i am debugging a application using OSGi, i terribly find out that if the Annotation class is missing, the class loader would omit that annotation, if i call the method.getAnnotations(), no exception, but return nothing.
i don't get it, but i do want to know if there is any way to make the JVM throw a Exception.
is there any option for s...
I want to load an applet from a server side script, eg. a Perl CGI program, etc. Can this be done? how?
<applet code=A21 width=256 height=256 archive="http://url/cgi-bin/test.cgi?R=applet">
thanks in advance for all help.
...
I get this message :
javax.xml.parsers.FactoryConfigurationError:
Provider
org.apache.xerces.jaxp.DocumentBuilderFactoryImp
but i can't seem to solve the problem. I have googled, but can't find any good solutions.
Does anyone have an idea of what could be wrong?
And maybe how to solve it :)
...
I have a legacy product, spread across dozens of repositories. I'm currently trying to refactor (and understand...) the given build process. First step was moving from the old version control system to mercurial, which was encouraging and easy.
The build process mainly uses ant build scripts (good news) but has to run 'on' the repositor...
I recently attended a talk by a Sun engineer Charlie Hunt regarding performance. The talk was interesting enough but one question was regarding release date of 1.7.
He said it's delayed as there are parties who are refusing to sign off JSRs they own and thus preventing the 1.7 release. It apparently has something to do with the cost of ...
Having my own Java code I'm using C# to call some unmanaged code that call (via JNI) the java code. I'm using JNI since I need to ensure:
the ability that the Java code will run over real JVM and not over some .NET VM
the ability to attach to the VM for debugging (IKVM does'nt support it)
I need free solution
The current free solutions...
Hi everyone,
I am working on a project which requires me to find the cyclomatic complexity of Apache ant (Versions 1.1 through 1.6). I have been asked to use the jar files for this purpose. I used a couple of tools (Xdepend trial version and Cyvis ) to have a look at the results. Then i tried to validate the results with results from th...
I am trying to write a function which will accept an InputStream with Zip file data and would return another InputStream with unzipped data.
The Zip file will only contain a single file and thus there is no requirement of creating directories, etc.
I tried looking at ZipInputStream and others but I am confused by so many different type...
I am helping a friend of mine put up a site for his business. I’ve read different posts and sites trying to find the ideal CMS tool, but people have different views of what is the best, so I finally just picked one of them at random.
So I went for an evaluation of Jahia 6.0-CE. As you’ve probably guessed by now, I don’t have so much exp...