java

Package Beans does not Exist

I am a .NET developer dabbling into the JSP world. I loaded NetBeans 6.5.1 and get an error in this page: <%@page import="java.io" %> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "w3.org/TR/html4/loose.dtd">; <html> <head> <meta http-equiv=...

Need help with callbacks and anonymous classes in Java

I am using some third party library to connect to a server via async protocol and get response back. For example method to get userid by username looks like this: public int getUserid(String username) { int userid = 0; connection.call("getUserid", new Responder() { public void onResult(final int result) { System.out.println(...

Java or PHP for homegrown CMS?

My boss has an idea for a web app he would like to build. Long story short it will need a lot of CMS features and a lot of social networking features, and some other unique things as well. We looked into just leveraging different CMS platforms like drupal and joomla etc, but they really don't meet our needs. We have decided to build o...

Blackberry Audio Recording Sample Code

This is probably lazy of me, but as I've mentioned before, the RIM website is a mangled mess. Does anyone know of a good repository to get sample code for the BlackBerry? Specifically, samples that will help me learn the mechanics of recording audio, possibly even sampling it and doing some on the fly signal processing on it? Basicall...

Status of the OSGi Deployment Admin Service

OSGi applications are composed of modules called bundles. The problem is that any reasonably sized application will have a large number of bundles (could easily be hundreds, just look at the plugins directory of your Eclipse IDE), so that you want a coarser granularity than individual bundles when managing or deploying the application. ...

Is it possible to override settings in a jboss-web.xml file?

Is it possible to override the settings in war file's WEB-INF/jboss-web.xml? I have a war file from a vendor, and I'd like to change the datasource which it uses without modifying the war file itself. <?xml version="1.0" encoding="UTF-8"?> <jboss-web> .... <resource-ref> <res-ref-name>jdbc/primaryDatasource</res-ref-name> ...

How to create a database connectivity sqlserver2000 through J2ME.

I want some helps from the professional people who know a lot in the J2Me. I work on a mobile application that the user will be stored and retreve the data from the database using sqlserver 2000. i am new in this area ( J2ME ) and I don’t know a lot, so I want help to finish this application, please... one more, j2me is not directly s...

This class uses AtomicBooleans. Is it thread safe ?

I don't like to lock up my code with synchronized(this), so I'm experimenting with using AtomicBooleans. In the code snippet, XMPPConnectionIF.connect() makes a socket connection to a remote server. Note that the variable *connecting is only ever used in the connect() method; whereas *connected is used in every other methods that needs t...

Which reporting tool to used with struts, spring, hibernate

Hello, I am developing Web Base Application using Spring, Struts2, Hibernate. Now i am in the reporting phase of my system. But i am little bit confused that which tool to use & which not. I had tried Jasper report with struts2 plugin, but facing lots of problem in jrxml file. Now can anyone suggest which reporting tool will be bett...

Changing a return type depending on the calling method

Basically what I want, istwo public methods with slightly different return values to call the same method to do whatever work is needed. They both return the return value of the private method, however the private method will know how to return the correct value depending on the public method that called it. Example methods: public Map...

How can I calculate the difference between two ArrayLists?

Hi, I have two ArrayLists .(IN JAVA Programming Language) ArrayList A contains ['2009-05-18','2009-05-19','2009-05-21'] ArrayList B Contains ['2009-05-18','2009-05-18','2009-05-19','2009-05-19','2009-05-20','2009-05-21','2009-05-21','2009-05-22'] I have to compare ArrayLst A and ArrayLst B . The result ArrayList should contain the ...

Performance comparisons of Frameworks to Use for an Auction Web Site

I am a Java guy and therefore would prefer a Java based framework for an auction site that I am planning to develop from scratch. But all my colleagues and friends have pointed out to me that the better sites that are coming up now-a-days are mostly written either using Ruby on Rails, Django or ASP.net MVC framework. I was wondering ...

How to stub/mock JDBC ResultSet to work both with Java 5 and 6?

Hi, I'm testing some of my classes working with JDBC statements etc and now I got problem with JDBC ResultSet interface: The software should run both with Java 5 and Java 6 and hence the tests should also be run with both versions. Unfortunately Java 6 has introduced a bunch of new methods (which is still not a big deal) that return a ...

Moving heavily templatized C++ code to Java

I have an application written in C++ (makes heavy use of templates) that I need to take to the Java ME platform. I have two questions: Are there any good tools to convert C++ code to Java - do some basic stuff so I have a platform to start with. I found this - http://tangiblesoftwaresolutions.com/Product_Details/CPlusPlus_to_Java_Conv...

[BIRT 2.3.2] Interactivity where are you gone ?

I am sorry to bother you but I am facing a very inconviniet problem ... I have been browsing around your many sites about BIRT and specially for Interactivity or scripting related subjects. But (it would be sooo nice to live in a flawless world) trying to perform some examples (like this one http://kickjava.com/src/org/eclipse/birt/cha...

view the Log on device

hi, I want to view the Log on device i.e the System.out.println(); I am able to view on DDMS but how to view on device screeen while running an apk file ...

File.exists() returns false when file exists

I've encountered a bug I can't seem to find any logic behind. I have this File object, which is created like this: File file = new File("utilities/data/someTextFile.txt"); I then do file.exists() and it returns false (!?). If the file is not found, I'm logging f.getAbsolutePath() to a file. When I look at the path, it seems OK. I can ...

no ocijdbc9 in java.library.path

When I try to run Java application, I receive the following error: Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path I don't have a file "ocijdbc9.*" on my PC, but I have "ocijdbc10.dll" in %ORACLE_HOME%\bin. %ORACLE_HOME% is correctly specified, so I think the problem is that the application...

Can't share some projects with Eclipse / subversive

I just encountered a strange problem - at least strange to me. Maybe someone has a solution (or a 'lesson learned'): I recently imported some eclipse plugin projects into a workspace and wanted to put this work under version control. But this wasn't possible for three out of seven projects: the Team->Share context menu item just didn't ...

IllegalArgumentException when setting public member

I've been playing around with reflection in Java... and I'm a little bit baffled. I was hoping that the program below would allow me to change the value of a public member variable within a class. However, I receive an IllegalArgumentException. Any ideas? public class ColinTest { public String msg = "fail"; public ColinTest()...