This is a strange error i am getting today when i try to implement a Map as below. I am using JDK 1.7 and not sure why this error has been coming and changing the above line by adding cast removes the error. I looked at the related posts in stackoverflow before posting this question seems to be strange issue.
Tag: java
How to change a package name in Eclipse?
In Eclipse I have a simple Java project that contains a package named (default package) and inside this package I have a class. I want to rename this package into something like: com.myCompany.executable I tried to select the (default package) —> right click —> refactor but now I see only th…
HQL unexpected AST node: :
My code is failing to inject the below repository. Based on the stack trace, it seems my HQL syntax is invalid, but I’m not sure what I’ve done wrong. stack trace: Update: I’m also getting this error with this query: I updated my versions to the latest: Update: I’m also getting this er…
Eclipse Content Assist is Appending Class Name to Variable Suggestions
Content Assist in Eclipse Juno is appending the Class name of variables to suggestions. For example, if I start to type: and hit Return, Eclipse changes this to: I don’t know if this is specific to Juno or if I accidentally turned this ‘feature’ on, but it is really annoying. Any idea how to…
Print Web page on 4 inch printer from mobile
I am developing a mobile web application. On the form when the user press Print button I need to print the page on a 4 inch printer. My question is how can I connect to the printer from the mobile web browser(may be using bluetooth, USB). My application will be running on all type of smart phones(Andriod , IO…
How can I add a linked source folder in Android Studio?
In Eclipse I can add a source folder to my Android project as a “linked source folder”. How do I achieve the same thing in Android Studio? Or is it possible to add an external folder to build in Gradle? Answer In your build.gradle file, add the following to the end of the Android node:
How do I print the content of httprequest request?
I’ve got a bug involving httprequest, which happens sometimes, so I’d like to log HttpGet and HttpPost request’s content when that happens. So, let’s say, I create HttpGet like this: This is the string representation that I’d like to get: With the post request, I’d also lik…
Change NameValuePair separator from ‘=’ to ‘:’
I am trying to send a HttpPost request, and to do this, from what I understand, you do this: The problem I’m having is that the entity looks like this: But due to the way the server is set up, I need it to look like this: You will notice that rather than equal (=) signs, there are colons (:)
How to implement a JDBC database into a Gui program to authenticate a user and password for logging into the program
I’m currently making a gui program and I’m clueless to how I am meant to set up my program so when the user inputs a username and password, and then clicks the login button it checks the database for the username and password, and if the username and password is in the database, they accepted, if …
JSP / JSTL causes NoClassDefFound error for TagSupport
This problem has been driving me mad for several weeks now and I suspect that the resolution, once I find it, will be simple. I have looked at every relevant answer I can find in StackOverflow but haven’t managed to resolve it, so I am hopeful that someone will be able to help me. I have re-created the …