With the directory on the classpath, from a class loaded by the same classloader, you should be able to use either of: // From ClassLoader, all paths are "absolute"...
That’s because the Scanner.nextInt method does not read the newline character in your input created by hitting “Enter,” and so the call to Scanner.nextLine returns after reading that newline....
I have a PowerShell snap-in for manipulating a database. The snap-in itself is just a wrapper for the main library implemented in a separate .NET DLL all written in...
Throwing multiple exceptions in Java
Avoid the Date object creation w/ System.currentTimeMillis(). A divide by 1000 gets you to Unix epoch. As mentioned in a comment, you typically want a primitive long (lower-case-l long)...
“Source folder is not a Java project” error in eclipse
I’m still learning the ropes of Java so sorry if there’s a obvious answer to this. I have a program that is taking a ton of memory and I...
I’m using WCF in communication between a server and client (both written in C#). In release-mode, the timouts should be set to ~20 seconds, but in debug mode I...
Java Collections provide LinkedHashMap out of the box, which is well-suited to building caches. You probably don’t have this in Java ME, but you can grab the source code...
Unexpected end of file” implies that the remote server accepted and closed the connection without sending a response. It’s possible that the remote system is too busy to handle...