I’m working in NetBeans 6.8 and I want to add projects that I had previously deleted from NetBeans workspace but not from my computer. Some appear as coffee-cups and can be opened fine but others appear as folders and cannot be opened. How can I open these projects (see image). Answer The Delete action …
“Activity not found” in Android
I am using the navigation-drawer template in eclipse to do a simple Android application. I have some trouble with fragment. I declared a fragment called PresenceLog Fragment in manifest but when I called it in MainActivity, the log still says that Here is my manifest Here is my fragment class Here is my MainA…
When might an IOError be thrown?
I have never seen a case when an IOError is thrown. The only thing that the docs say about IOError it this: Thrown when a serious I/O error has occurred. There aren’t any subclasses or anything …
How to get info of an FTPFile
I am using ApacheCommons to connect to a server and get information of a specific file. I am looking for a method like FTPFile file = ftpclient.getFile(path); or something like this, so I can give it the path of the file and then be able to get info about that file. By info I mean file.getName() or file.lendt…
Why does “ImageIO.read(URL input)” fail on some images on Weblogic 12c?
Alright, I have a problem that is driving me crazy! I have a web application deployed on Weblogic 12.1.1 -i.e.:Weblogic 12c At some point, I want to read an image File using: The previous line fails on some images with the following so-stupid message: Some advised that I change the HTTP handler for Weblogic u…
How to turn minutes into years and days?
In the textbook it explains how to convert seconds into minutes with how many seconds remain but the question I have is as follows. Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the minutes. For simplicity, assume a year has 365 day…
Set the first day of the week in JavaFX’s DatePicker
Is it possible to change the first day of week on JavaFX’s DatePicker when applying Arabic locale? I need to change it from Saturday to Sunday. Answer I was able to change the first date of the week by injecting the following class within my application: Do not forget to change the default locale: EDIT:…
Java CertificateException “No subject alternative names matching IP address … found”
I’m trying to implement a selfsigned certificate into my webserver, and it’s working already with firefox and chrome (both from the server itself and from a remote machine)… but I can’t get it to work with java. I’ve already created a keystore file that contains my certificate, b…
Alternative to using StringEscapeUtils.escapeJavaScript() in commons lang3
I’ve been tasked with updating our code from using org.apache.commons.lang to org.apache.commons.lang3 and I’ve found that the newer version of StringEscapeUtils no longer has the method escapeJavaScript() however we were using this in quite a few places throughout our code. I’ve been readin…
How to integrate Spring Security with Spring Batch?
I want to create a secured web application where users can launch Spring Batch jobs. I want to keep track about who launched which job and thus I have to associate a JobInstance (or a JobExecution?) with a user. I additionally want to query for JobExecutions that were started by a particular user. This does n…