java

What are the main competitors to Servoy?

Our company uses Servoy for rapid application development. It is a 4GL environment, that can target web-applications running in Tomcat as well as Java applications, all from the same program. While it is standards based, some aspects of the generated code are proprietary, which couples those applications to the Servoy environment and to...

Resolving axis2 and OC4J library conflicts.

I'm trying to deploy an Axis2 web service to an OC4J 10.1.3 app server. I was using axis 1.4 before and had just created my own shared library with all of the files. There was an issue with 1.4 that was patched with 1.5 so now I'm using that but it does not include all of the libraries. This time I deployed the axis2.war to the OC4J...

Java math expression parser that can take complex numbers as a variable?

I am writing a program in Processing that transforms complex numbers. However, I want to have a method of taking an input string and calculating the transformation using a complex variable. For example: 1/(z+1) (z^2)/(z/2) where z is a complex number. Now, I've looked at JEP and some examples, but I cannot work out if it would allow y...

What are tools and best practices for testing web services?

I'm about to start work on a large project that will involve providing a significant number of web services. We'll be using the Java platform, so, of course, we'll be making heavy use of JUnit, Hudson, etc. (although I'm not sure that matters at all.) We're looking for a set of best practices and/or tools for testing the web services. ...

100% Java encoder for AVI animation

I am looking for a 100% Java solution for encoding software generated images into an AVI stream together with an uncompressed audio track. At the moment I am using JMF, but its size and installation problems make it a bad solution for my purpose. ...

How can I implement Session-Per-Request ("Open-Session-In-View") pattern using JAX-RS?

I'm using JDO on AppEngine with Restlet + JAX-RS extensions. In my sub-resource locator class I load the entity in the constructor. Then for the various methods I used the data. If I close the PersistenceManager before returning from the Constructor, collections of one-to-many fields are not initialized and remain null. I read about "d...

Pushdown automaton branches

I'm asked to write a pushdown automaton program using java?I'm up to the simulation part. My pda is non deterministic.I need to set time limit for computation as it might go to one branch forever.This is the part I don't understand.In which case it will go to a branch forever?Can you please give me example how it moves to that situation?...

Counting Bytes sent/received over HTTP

In Java, How could the bytes sent and received over an active HTTP connection be counted? I want to display some statistics like: Bytes Sent : xxxx Kb Bytes Received : xxxx Kb Duration : hh:mm ...

Generic XML sorting via XSLT applied by Java?

Basically, I want an exact copy of the XML, except I'd like to sort certain nodes by their ID attribute. Not all elements with the ID attribute should be sorted. I've kludged together a working stylesheet, but it requires me to hard-code the <xsl:apply-template>'s in for all sibling nodes to the nodes I'm sorting on. I've no formal ...

Why are two Java threads (in some cases) more than twice as fast as one?

File: Example1.java public class Example1 implements Runnable { public void run() { for(int i = 0; i < 100000000; i++) { int x = 5; x = x * 4; x = x % 3; x = x + 9000; x = x * 923; } } public static void task() { for(int i = 0; i < 100000000; i++) { int x = 5; x = x ...

Frame/clip grabs using Java from a network video camera/adapter (no activex)

I'm interested in doing image processing in Java with frames collected from a network video adapter. The first challenge is finding network video adapters/cameras which don't require an ActiveX control for PTZ control and therefore require IE. Then the issue is how to do still image grabs from network video adapters which only make MP4...

Java XmlRPC Authentication

Hi Any clue or example on how to implement basic authentication for XMLRPC using org.apache.xmlrpc.webserver.WebServer? I'm using the Java API apache-xmlrpc-3.1.2 and I'm not being able to implement authentication without org.apache.xmlrpc.webserver.ServletWebServer ...

What's the equivalent of Java's Thread.sleep() in Javascript?

What's the equivalent of Java's Thread.sleep() in Javascript? ...

Can Java omit sending some headers in HTTP requests?

I'm using the HttpConnection class in Java to send HTTP requests. How do I omit unwanted HTTP headers? like: User-Agent Accept Accept-Language Accept-Encoding Accept-Charset Keep-Alive Connection Referer If-Modified-Since ...

Good Book on Writing a 3D Modelling Application in Java

Hi :), Does anyone know a good book on how to write a 3D Modelling Application in Java? Thanks Q Edit: Thanks for the suggestion. ...

Alternatives to DWR (www.directwebremoting.org)

I've been a big of DWR (www.directwebremoting.org) in the past and have used it on a few projects. It makes AJAX easy by creating javascript proxy / stubs to java classes on the server. While DWR has been around for years it seems to have slowed down ever since the main developer moved on - it's also quite large compared to it's early d...

Disable Entire JPanel Including Components Inside Itself

Currently, the disable a JPanel including all its components with a single method call, I have to override its disable method as follow : @Override public void setEnabled(boolean enabled) { super.setEnabled(enabled); Component[] components = getComponents(); if (components != null && components.length > 0) { int count = ...

Career Choice in JEE, are EJBs standard?

I have chosen to go the JEE route for a career path but I have been having a hard time determining which core technologies that I need to be most familiar with. I'm at the point I can write web apps without a problem with JSP's and regular servlets using JDBC or some basic Hibernate stuff (I know, HTML, CSS and have used MVC extensively ...

Can I have different copies of a static variable for each different type of inheriting class

I want to have the same static variable with a different value depending on the type of class. So I would have public class Entity { public static Bitmap sprite; public void draw(Canvas canvas, int x, int y) { canvas.drawBitmap(sprite, x, y, null); } } public class Marine extends Entity { } public clas...

How to write a function that takes an iterator or collection in a generic way?

I've been a Java programmer almost exclusively for the past 8 years or so, and recently I've been playing with C++ again. Here's an issue that I've come up against with regards to iterators in C++ STL and Java. In Java, you can write a method that takes an iterator like this: void someMethod(Iterator<String> data) { // ... } You ...