java

What is java.lang.UnsatisfiedLinkError ... (Operation Failed: 14)

I am trying to deploy our eRCP (embedded Rich Client Platform) application on a Windows CE5 Professional device. While the eRCP demo applications work fine on the J9 VM upon starting our application I get the following exception: !ENTRY org.eclipse.osgi 4 0 2008-09-24 11:01:15.088 !MESSAGE An error occurred while automatically activatin...

Avoid RePublishing the web application after Eclipse Shutdown

I am having my web application deployed on Tomcat5.5 and I use it in integration with eclipse 3.2.Each time I close the eclipse and restart it, I need to republish the application even when it hasn't been modified. Is there a way to avoid this or any step I am missing ? ...

Modular web apps

I've been looking into OSGi recently and think it looks like a really good idea for modular Java apps. However, I was wondering how OSGi would work in a web application, where you don't just have code to worry about - also HTML, images, CSS, that sort of thing. At work we're building an application which has multiple 'tabs', each tab b...

Calculate client-server time difference in Borland Starteam server 8

Problem. I need a way to find Starteam server time through Starteam Java SDK 8.0. Version of server is 8.0.172 so method Server.getCurrentTime() is not available since it was added only in server version 9.0. Motivation. My application needs to use views at specific dates. So if there's some difference in system time between client (whe...

Linux commands from Java

Is it possbile to execute linux commands with java? I am trying to create a web servlet to allow ftp users to change their passwords without ssh login access. I would like to execute the next commands: # adduser -s /sbin/nologin clientA -d /home/mainclient/clientA # passwd clientA # cd /home/mainclient; chgrp -R mainclient clientA # c...

Can Java POI write image to word document?

Anyone know if it is possible? And got any sample code for this? Or any other java API that can do this? ...

How do I handle multiple streams in Java?

I'm trying to run a process and do stuff with its input, output and error streams. The obvious way to do this is to use something like select(), but the only thing I can find in Java that does that is Selector.select(), which takes Channels. It doesn't appear to be possible to get a Channel from an InputStream or OutputStream (FileStream...

Objections against Java Webstart?

Since the release of Adobe AIR I am wondering why Java Web Start has not gained more attention in the past as to me it seems to be very similar, but web start is available for a much longer time. Is it mainly because of bad marketing from Sun, or are there more technical concerns other than the need of having the right JVM installed? Do...

Java: Eclipse - Diff Trace

I've got two versions of a project with a JUnit test. Looking at the diff of the files there's no obvious reason to this, but the test passes on one project but not on the other. For a while now I've wondered if there was a program that would record a trace through the whole program when it runs and save it to a file. This would be real...

Passing JS function to applet for as event listener

Is it possible to pass a function/callback from javascript to a java applet? For example i have an applet with a button that when pressed it will call the passed js callback function onCommand() {alert('Button pressed from applet');} applet.onCommand(onCommand); ...

Opensource Implementation of the Alias Method

I am doing a project at the moment, and in the interest of code reuse, I went looking for a library that can perform some probabilistic accept/reject of an item: i.e., there are three people (a, b c), and each of them have a probability P{i} of getting an item, where p{a} denotes the probability of a. These probabilities are calculated...

Why does maven 2 try to download dependencies that I already have ?

When I launch the "mvn install" command, maven sometimes tries to download dependencies that it has already downloaded. That's expected for SNAPSHOT but why does maven do that for other JARs? I know I can avoid that behavior by "-o" flag but I just wonder what the cause is. ...

Qt Jambi: QAbstractListModel not displaying in QListView

I've created an implementation of the QAbstractListModel class in Qt Jambi 4.4 and am finding that using the model with a QListView results in nothing being displayed, however using the model with a QTableView displays the data correctly. I'm experienced with C# but have only been using Qt Jambi for a couple of days now. Below is my im...

Java: Invalid Keystore format Error

Hi, Does anyone know how to solve this java error? java.io.IOException: Invalid keystore format I get it when I try and access the certificate store from the Java option in control panels. It's stopping me load applets that require elevated privileges. Error Image Thanks for any help ...

How do I make a gwt-ext window not resize when its content resizes?

I've run setHeight(600) on a Window, that's it's initial size. I've also went ahead and done setAutoScroll(true). When the content of the window resizes, the window itself resizes. What I want is for the window to stay fixed in size, and when the content grows larger, add scrollbars. I can get this if I resize the window manually, then ...

How to read console output in j2me cellphones? Where does System.out.println() go?

When writing j2me applications for cellphones, using System.out.println() prints on the console if using an emulator. However, when the code is deployed on a cellphone, where does the console output go? If it is impossible to see this in the untethered cellphone, is there a way to see it if the cellphone is still connected to the deploy...

What's a good compression library for Java?

I need to compress portions of our application's network traffic for performance. I presume this means I need to stay away from some of the newer algorithms like bzip2, which I think I have heard is slower. ...

Spring vs. JSF

I have a dilemma at my job. We're looking to integrate two different J2EE projects and they both use different frameworks for the web component. We're also looking to add more dynamic capability/AJAX to it. One uses JSF and the other uses Spring. Basically we're trying to pick one of the projects and integrate them using that technol...

Using 'this' as a parameter to a method call in a constructor

I have a constructor like as follows: public Agent(){ this.name = "John"; this.id = 9; this.setTopWorldAgent(this, "Top_World_Agent", true); } I'm getting a null pointer exception here in the method call. It appears to be because I'm using 'this' as an argument in the setTopWorldAgent method. By removing this method call everythi...

Is there any way, in java, to check on the status of a windows service?

I am looking for a library that will allow me to look up the status of a windows service to verify that the service is started and running. I looked into the Sigar library, but it is GPL and therefor I cannot use it. A Commercial or BSD(ish) license is required as this will be bundled into commercial software. ...