java

Automation server can't create object - Microsoft JScript runtime error

Hi, I am trying to run a Java webstart application which is launched from a html page. While loading I get an alert with the message "Automation server can't create object" a couple of times after which the applications starts and works fine. The alerts come up only on one of the workstations. Any pointers on where I should look? Regards...

SmartGWT alternatives

I have been using SmartGWT but have run into trouble mixing SmartGWT with other frameworks such as Wicket. Infact it has been a bit of a disaster and I regret going with it in the first place. I do not want this question to turn into any type of flame war, so therefore would just like people to list alternatives and their experience wi...

ObjectUtils.equal(x,y) null can work

ObjectUtils.equal(x,y) x if is null can work? ...

XMPP web client for commercial web application

I have the task of choosing an XMPP server/client solution for an internal web application. The goal is for employees to be able to utilize it via desktop client or the web application. The web client is mandatory. The web application is written in PHP, but I don't necessarily need a PHP solution. Flash or Java are acceptable (Flash ...

how do i shut down my OS with java

how do i shut down my OS with java ...

we implement connection pooling ourselves, but why it always out of connection ?

Following is the source code: //public class ConnectionPool implements Runnable public class ConnectionPool { private static Logger loger_error = Logger.getLogger("error"); // JDBC Driver name String driverName; // JDBC Connection URL String connectionURL; // Minimum size of the pool int connectionPoolSize;...

coordinate detection via mobile phone

Hello I am curious how hard it would it be to detect current coordinates by mobile phone? I am planning to write a mobile application which will focus on phones that can run java (ie Samsung Omina) and it will be based on the location of the user so I can do some Google map action using the coords. Using GPS sounds like an idea, howev...

Best/quickest way to learn Java for a seasoned .NET/C# and C++ developer

What is the quickest/easiest way to learn Java for a seasoned .NET/C# (more than 7 years) and C++ (5years) developer. When I say to learn Java - I mean being able to write applications in a "Java way" using base classes library + where needed using a popular Java libraries (it is great that so many of them are open source). I know that...

When is messaging (e.g. JMS) an alternative for multithreading ?

I work on a data processing application in which concurrency is achieved by putting several units of work on a message queue that multiple instances of a message driven bean (MDB) listen to. Other then achieving concurrency in this manner, we do not have any specific reason to use the messaging infrastructure and MDBs. This led me to th...

open source SDK for fingerprint matching

I am looking for a opens source SDK in java for fingerprint matching with good accuracy. Can anyone suggest me one? ...

Is there a JMS queue browser GUI tool that can integrate with Glassfish ?

The title says it all. I have a few JMS queues created on Glassfish 2.1 server. I need a GUI browser that lets me view the messages being sent to the queue in real time. I read about Hermes on another SO thread but I am not sure if it works with Glassfish. I also installed this plugin for Netbeans but it isn't working for me ( I get ...

Hibernate cannot recover after socket has timed out

I have an application that uses Hibernate to connect to my MySQL database. I'm just having a weird problem with timeouts. Let's say that the socket timeout in MySQL's configurations is set to one hour. After an hour of inactivity, the socket times out as expected. The problem is that Hibernate doesn't seem to be able to handle the socket...

How can I obtain the message resources object in a servlet?

Hi everyone, I'm developing a project with Struts and I was wondering if it's possible to get the message resources object in a servlet, which is included in the same project. There's no possibility to get that object with the method getResources(HTTPServletRequest) because the servlet does not extends an Action class. Is there a way t...

How to traverse XPath recursively ?

Hi, is there a way (and if so, how ?) to traverse a XPath query recursively ? I have an AST in Java with the following scenario @Relevant public void foo() { bar(true); } public void bar(boolean flag) { assert flag; } I want to find the method which is annotated with '@Relevant' (thats easy) and check if the method which is ca...

how to mock a parametrized constructor?

I've the following class. It has the code to connect to SAP in its constructor. There is an abstract method(the subclasses define the implementation) which I want to mock. public abstract class BapiExecutor { ... public BapiExecutor(final SapConnectionInfo connectionInfo) throws java.lang.Exception { if (!vali...

How can I combine WAR packaging and OSGi bundle creation in Maven?

I want to deploy one of my OSGi bundles with a war package structure so it is recognized as a web application by Struts. I use Maven, so I get WAR packaging built-in and I have the Maven bundle-plugin to create the OSGi compatible manifest for me. The problem is, the two don't work together, so the bundle plugin is not aware that the cl...

Using different layouts in GUIs

This is what my program should look like and I'm a bit confused on where I should use different layouts. I have a Window class which calls the Panel class and the Panel class calls the InputPanel and DisplayPanel classes. My InputPanel class calls my DetailsPanel, CrimePanel and ButtonPanel classes so they make up what is seen under th...

Applet lifecycle in Mac OS X

I have two applets A and B. They are embedded in separate pages. On destroy, A serializes objects to the local file system. On init, B deserializes these objects. This set-up works fine in Windows. Unfortunately, I have discovered that it doesn't work in Mac OS X. This is because B is initialized before A is destroyed. Does anyone...

Is it possible to ignore certain unit tests?

Hi, I'm currently working on a project which uses JUnit4 extensively throughout all the modules. We're using Maven2 to build the project and Hudson for continuous integration. The project is built and run under Java 1.5. We've recently added quite a large raft of unit tests which are needed at times, but don't want to be run during the ...

How to display progress of Ant build?

When running an Ant script with the -logfile logFile option, is it possible to still print out some very basic progress information? I would be delighted even with something as basic as printing '.' to standard out for every new target hit. I've found the splash ant task which seems to be along the right lines, only I'm looking for some...