Packaging Blackberry OAuth app throwing error

Make sure your java bin path is set in environment variable. http://docs.oracle.com/javase/tutorial/essential/environment/paths.html and take a look at the last 3 posts in the following website: http://supportforums.blackberry.com/t5/Java-Development/I-O-Error-Cannot-run-program-quot-jar-quot-CreateProcess-error-2/td-p/522638 Also make sure The Java® software development kit (Java SDK/JDK) is installed on the computer, and a correct version of the Java SDK is used. http://supportforums.blackberry.com/t5/Java-Development/I-O-Error-CreateProcess/ta-p/445949 As mentioned in … Read more

How do I convert between ISO-8859-1 and UTF-8 in Java?

In general, you can’t do this. UTF-8 is capable of encoding any Unicode code point. ISO-8859-1 can handle only a tiny fraction of them. So, transcoding from ISO-8859-1 to UTF-8 is no problem. Going backwards from UTF-8 to ISO-8859-1 will cause “replacement characters” (�) to appear in your text when unsupported characters are found. To … Read more

J2ME/Android/BlackBerry – driving directions, route between two locations

J2ME Map Route Provider maps.google.com has a navigation service which can provide you route information in KML format. To get kml file we need to form url with start and destination locations: public static String getUrl(double fromLat, double fromLon, double toLat, double toLon) {// connect to map web service StringBuffer urlString = new StringBuffer(); urlString.append(“http://maps.google.com/maps?f=d&hl=en”); … Read more

Convert a JSON string to object in Java ME?

I used a few of them and my favorite is, http://code.google.com/p/json-simple/ The library is very small so it’s perfect for J2ME. You can parse JSON into Java object in one line like this, JSONObject json = (JSONObject)new JSONParser().parse(“{\”name\”:\”MyNode\”, \”width\”:200, \”height\”:100}”); System.out.println(“name=” + json.get(“name”)); System.out.println(“width=” + json.get(“width”));

Difference between volatile and synchronized in Java

It’s important to understand that there are two aspects to thread safety. execution control, and memory visibility The first has to do with controlling when code executes (including the order in which instructions are executed) and whether it can execute concurrently, and the second to do with when the effects in memory of what has … Read more

Difference between Java SE/EE/ME?

Java SE = Standard Edition. This is the core Java programming platform. It contains all of the libraries and APIs that any Java programmer should learn (java.lang, java.io, java.math, java.net, java.util, etc…). Java EE = Enterprise Edition. From Wikipedia: The Java platform (Enterprise Edition) differs from the Java Standard Edition Platform (Java SE) in that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)