When you run a JUnit 4 ParameterizedTest with the eclipse testrunner, the graphical representation is rather dumb: for each test you have a node called [0], [1], etc.
Is it possible give the tests [0], [1] etc. explicit names? Implementing a toString method for the tests does not seem to help.
(This is a follow-up question to JUnit test...
I am trying to use Bill the Lizard's code to send an email using Google Apps. I am getting this error:
Exception in thread "main" javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first. f3sm9277120nfh.74
at javax.mail.Transport.send0(...
How do I get a DateFormat of some sort to throw an exception if I try to parse an illegal date? If I parse a date like "99.99.9999" with a SimpleDateFormat with the pattern "dd.MM.yyyy", no exception is thrown, but this is clearly not a valid date.
...
Why do I always feel that Java never worried about growing its own API (the one that comes with it)?
I've got several examples..
File upload. Servlet API does not handle it.
Easy XML reading
Connection pooling
HttpClient support
Good logging
Encoders
And so goes on... several lacks that we have to look for third party APIs and...
I have a Java Applet (JApplet). This Applet uses a JComponent(PanelAux) to show values and images that change periodically. But the applet doesn't refresh itself. What can I do to refresh my applet?
//--------------------------------------------RUN
public void run()
while (true) {
try {
myThread.sleep(1000);
...
Can we use Java in Silverlight?
...
Whats the other option we can use for multiple inheritance other than implementing interface
...
Duplicate of: Continuous Integration Servers
Hi,
Recently i've looked into several CIS and read a lot of articles about them.
I'm kinda impressed by Hudson, because it is so easy to set up. I like to start a discussion about several CIS like CC, Bamboo, Continuum etc. It would be nice if some experienced users could tell me about dif...
In Java 1.4 you could use ((SunToolkit) Toolkit.getDefaultToolkit()).getNativeWindowHandleFromComponent() but that was removed.
It looks like you have to use JNI to do this now. Do you have the JNI code and sample Java code to do this?
I need this to call the Win32 GetWindowLong and SetWindowLong API calls, which can be done via the Ja...
I've seen Veloedit, which seems to have good syntax highlighting but doesn't allow tab characters in the file being edited (wtf?) and also has no understanding of HTML.
With a little bit of googling I've found Veloecipse, which claims to build upon Veloedit and also add HTML support - but doesn't seem to be compatible with Eclipse 3.4.
...
I've begun playing with MBeans for exposing some information about an app. Pretty much the totality of HOWTOs / Tutorials / Blog posts / Samples online teach you how to implement an MBean and register it with an MBean Server, but never mention (or only cursorily) unregistering the MBean from the server.
I'm concerned about an MBean that...
I've used a java screen recorder called Krut, it uses JPEGImageEncoder, the image quality isn't as good as I need, so I'm trying to change it to use a PNGImageEncoder, but where can I find a stand alone version with open source, so I don't have to get into a huge project trying to gather all the necessary support classes it needs to work...
Based on this question it appears that the default template for CheckStyle will allow if else ladders to separate the if and else with a line break.
Meaning I would like this code to be flagged as a violation:
if (true)
{
System.out.println("20");
}
else
if (true)
{
System.out.println("30");
}
Is there a Ch...
Closed as 'Exact Duplicate' of: How can I explain to a non-technical person what I do for a living?
It sucks trying to explain your job to someone and they give you a blank stare in return. Any remedies?
My best answer is "I am like Micheal Bolton on Office Space"
...
Here's my code:
public class Sequence<T> {
protected List<T> sequence = new ArrayList<T>();
public Matrix<OrderedPair<T, ?>> createCartesianProduct(Sequence<?> secondSequence) {
Matrix<OrderedPair<T, ?>> result = new Matrix<OrderedPair<T, ?>>();
for (int rowIndex = 0; rowIndex < sequence.size(); rowIndex++) {
S...
conversion from multiple non-graphical document formats to and from HTML (e.g. doc<->HTML, pdf<->html, odt<->html, etc.)
command line or API (Java API is preferable)
cross-platform
commercial or open source
Are there any well known solutions that meet/exceed these requirements?
...
I'm trying to determine if FatWire Content Server integrates with Active Directory, or do I also need FatWire Content Integration Platform, as suggested here:
http://www.intranetjournal.com/articles/200808/ij_08_18_08a.html
...
What is the difference between Java and C++? Are both object-oriented?
...
I am working on a .jar file library to implement a bunch of helper classes to interface a PC to a piece of external hardware. I'll also add some simple applications, either command-line or GUI, to handle common tasks using the library.
My question is, is there a recommended way to simplify the command-line instantiation of a JVM in a ce...
If you decompile the java.lang.Class class in java from the rt.jar library you will notice there is a native method declaration:
native ConstantPool getConstantPool();
I played a while ago with class decompilation using Sun's .class file specification and I was able to obtain the constant pool record from each .class file. But that wa...