java

Java Static

Duplicate: http://stackoverflow.com/questions/413898/what-does-the-static-keyword-do-in-java I've read this post already. What does the "static" keyword in a method do? I remember being told that static != clingy...but that is pretty much all I know about this keyword. ...

Scalaris: P2P key-value database - your opinion please.

Why wouldn't you use Scalaris? ...

Offline Java Documentation

I've finally gotten around to learning Java and am looking for some documentation for Java that I can download and read offline. Something like Sun's stuff but zipped up or as a PDF or CHM. I'm using Eclipse so something that integrates with that would be nice. It already seems to have some of what I want somewhere (the javadoc stuff) b...

How to tell if my Java component is in an Applet?

I have a Component which I am using both in a standalone Java application as well as in a Java applet. How can I figure out from within the Component whether my component is in an applet? Also, once I figure out that I'm running in an Applet, how can I get access to the Applet? ...

Create RPM package from ANT script under Windows

I need to create an RPM package from an ANT script that runs on a Windows computer. This package must contain the result classes from the build plus some other, additional resources. I guess there should be some program somewhere that can be invoked from the command line to create this package. The reason why I want to do this under w...

Detect which monitor shows the Window

I do have main application JFrame window which can include different components. I open a self implemented OnScreenKeyboard when the user select a editable textfield. The OSK is also a JFrame window. When the user drag the main window to another monitor, the OSK should also be shown on the same monitor. For this i have to detect the mon...

Java/XSLT Problem: Cannot find a matching 1-argument

I get the following error: javax.servlet.ServletException: Cannot find a matching 1-argument function named {http://exslt.org/dynamic}evaluate() at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774) The top...

Apache Roller Weblogger software- Can anybody have the information!

Hi, I am creating a blog using Apache Roller Weblogger software, am very new to this.. I am deploying it on the Tomcat, and m using the PostgreSQL database.. I did all the configuration in the roller-custom.properties.. If i give the url http://localhost:8080/roller/ in the browser I am getting the resource not available error, And in t...

Java: Getting JPen to work with LWJGL

Hello, For the last few days I've been trying to get the JPen (pen tablet input library) to play nice with LWJGL, but I can't for the life of me get it to work. The initial problem was getting a Component to give to JPen, but using one of the AWT examples from LWJGL should fix that, as they give you access to a Frame and Canvas. What I...

Which java YAML library should I use?

There are at least 4 YAML implementations listed at yaml.org. Which one of these (or another) would you recommend, and why? There are two ways you could answer this question, either by voting for one of the 4, or by giving a good answer that compares them or strongly justifies one of them. I'll add the 4 mentioned so people can vote, b...

Is there a way for a Java application to detect if the screen is locked?

I'm looking for a way to know in a Java application (without JNI - it's a multi-platform application) can detect if the screen is locked. For information... our application records time while a user is working - we want it to automatically stop recording when the screen is locked instead of the user having to do so explicitly. ...

Template engine for image generation

Does anyone know of any templating engines for generating images, preferably Java-based? What I have in mind is something like StringTemplate where a you have a set of parameterized templates that render to an image (or SVG, etc) rather than text. It needs to be more general purpose than "insert text here to generate a sign". Primitiv...

What do < and > mean such as implements Comparable<BigInteger>?

In Java 1.4.2, class java.math.BigInteger implements interfaces Comparable, Serializable. In Java 1.5.0, class java.math.BigInteger implements interfaces Serializable, Comparable<BigInteger>. This is just an example to help me ask about < and >. What I am really wondering about is the < and > stuff. My question is threefold: What doe...

Custom spring scopes ?

Anyone know of any other custom spring scopes than Servlet Context Scope and ThreadScope ? If you've made some closed-source custom scope I'd really also be interested in hearing what it does and how it worked out for you. (I'd imagine someone would make a WindowScope in a desktop app ?) I'm open to all use cases, I'm looking to expan...

Java Events: Is this a good way to go about it?

I'm reimplementing a .Net API in Java and the API specifies a whole bunch of events, ehich java doesn't implicitly support. I'm going to use an observer pattern but due to the number of event I really don't want to clutter the interface. I was wondering if it was a good idea to declare an "Event" class which has a subscribe method whic...

Why KeyTyped event does not show under Linux when typing unicode?

I have a Swing Application running under Linux, that has problems to display accented characters. Looking into the application, I tracked the problem to the Keyboard. I added a new EventQueueManager to intercept all events received. I typed the "[dead acute] [a]" sequence on both systems. In windows I get: D 090116 100330.015000 AW...

batch not working if calling from a Java program

I wrote a batch file that reads in a text file which contains a list of file name, and then delete and rename them one by one. I did this by using a for loop, and it works perfectly by double clicking it. But when I tried to call this batch from a Java program. It's no longer working for this part: for /f %%a in (ListFile.txt) do ( ...

Java Generics: How do i make the method return type Generic?

Consider this example (typical in OOP books): I have an Animal class, where each Animal can have many friends. And subclasses like Dog, Duck, Mouse etc which add specific behavior like bark(), quack() etc. Here's the Animal class: public class Animal { private Map<String,Animal> friends = new HashMap<String,Animal>(); public v...

Lightweight Java persistence

What are the lightweight options one has to persist Java objects ? I'm looking for the easiest possible solution. I don't want anything fancy featurewise just something simple that works with reasonnably simple objects (some collections, relationships and simple inheritance) and doesn't bring too much apparent complexity (if any) to th...

Important frameworks/tools to learn

Heyja, a frequently used answer to the question "What is so special about Java?" is "The tools and frameworks". I guess this is correct. I am stunned when i see all the tools and frameworks which make your life as a developer much easier. My Java skills are not perfect, but good average, and i am still working on it. I have begun to le...