In the Java collections framework, the Collection interface declares the following method:
T[] toArray(T[] a)
"Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. If the collection fits in the specified array, it is returned therein. Otherwise, a ne...
I'm looking for an open source package written in java that implements a registration, authentication (like securityfilter) with captchas and email link verification and all that. I could write it, but why reinvent the wheel. I've looked all over the place and haven't found anything. Does such a thing exist?
...
I have an ant build that makes directories, calls javac and all the regular stuff. The issue I am having is that when I try to do a clean (delete all the stuff that was generated) the delete task reports that is was unable to delete some files. When I try to delete them manually it works just fine. The files are apparently not open by an...
I have an application written in java, and I want to add a flash front end to it. The flash front end will run on the same computer as the java app in the stand alone flash player. I need two way communication between the two parts, and have no idea how to even start going about this. I suppose I could open a socket between the two prog...
Is it possible to sign only part of an applet? Ie, have an applet that pops up no security warnings about being signed, but if some particular function is used (that requires privileges) then use the signed jar?
From what I can tell, some (perhaps most) browsers will pop up the warning for a signed applet even if you don't request priv...
Coming from C++ to Java, the obvious unanswered question is why not operator overload.
On the web some go about: "it's clearly obfuscated and complicate maintenance" but no one really elaborates that further (I completely disagree, actually).
Other people pointed out that some objects do have an overload (like String operator +) but t...
Does anyone have any pointers on how to read the Windows EventLog without using JNI? Or if you have to use JNI, are there any good open-source libraries for doing so?
...
What are the best (as in most effective) resources for learning Java?
...
Hello,
I intend to develop a system that is entirely based on modules. The system base should have support for finding out about plugins, starting them up and being able to provide ways for those modules to communicate. Ideally, one should be able to put in new modules and yank out unused modules at will, and modules should be able to u...
I'm looking for a book to learn to "engineer" programs better. I program in Java already. Looking at the source code of open-source projects usually is too complicated as I have never made a program with more than 20 small files in it. I'm not an advanced programmer, I learned with a book and do this mostly for personal projects.
My las...
I've been running into a peculiar issue with certain Java applications in the HP-UX environment.
The heap is set to -mx512, yet, looking at the memory regions for this java process using gpm, it shows it using upwards of 1.6GBs of RSS memory, with 1.1GB allocated to the DATA region. Grows quite rapidly over a 24-48hour period and the...
In Ruby on Rails, there's RJS templates that help do AJAX by returning javascript code that will be executed in the client browser. How can I do a similar thing in the Java/J2EE world? Is Google Widget Toolkit similar to RJS? What options do I have?
...
is there an effective tool to convert c# to java?
...
I'm looking around for a Java Code Signing certificate so my Java applets don't throw up such scary security warnings. However all the places I've found offering them charge (in my opinion) way too much, like over $200 per year. While doing research, a code signing certificate seems almost exactly the same as a SSL certificate.
The mai...
I just installed Ubuntu 8.04 and I'm taking a course in Java so I figured why not install a IDE while I am installing it. So I pick my IDE of choice, Eclipse, and I make a very simple program, Hello World, to make sure everything is running smoothly. When I go to use Scanner for user input I get a very odd error:
My code:import java.uti...
A Java6 application sits in the system tray. It needs to be activated using a hotkey (e.g. Super-G or Ctrl-Shift-L etc) and do something (e.g. showing an input box).
How do I do that on:
Windows (XP or Vista)
OS/X
Linux (Gnome or KDE)
...
Hi!
I've been having trouble to make a JFormattedTextField to use dates with the format dd/MM/yyyy. Specifically, as the user types, the cursor should "jump" the slashes, and get directly to the next number position.
Also, the JFormattedTextField must verify if the date entered is valid, and reject it somehow if the date is invalid, or...
The situation is this:
You have a Hibernate context with an
object graph that has some lazy
loading defined.
You want to use
the Hibernate objects in your UI as
is without having to copy the data
somewhere.
There are different UI
contexts that require different
amounts of data.
The data is too
big to just eager load the whole
gra...
While we try to set up as many unit tests as time allows for our applications, I always find the amount of UI-level tests lacking. There are many options out there, but I'm not sure what would be a good place to start.
What is your preferred unit testing tool for testing Swing applications? Why do you like it?
Thanks!
...
How are folks integrating various static analysis tools such as PMD, Checkstyle, and FindBugs so that they are used together in some uniform way? In particular, I'm interested in generating a single uniform report that includes warnings from all tools. Also, I want to be able to mark-up my code with reasonably consistent looking warning ...