java

Linux distros for Java Development

Simply, are there any Java Developer specific Linux distros? ...

Is there a way to embed a browser in Java?

Is there a way to embed a browser in Java? ...

Running a regular background event in Java web app

In podcast #15, Jeff mentioned he twittered about how to run a regular event in the background as if it was a normal function - unfortunately I can't seem to find that through twitter. Now I need to do a similar thing and are going to throw the question to the masses. My current plan is when the first user (probably me) enters the site ...

Rule of thumb for choosing an implementation of a Java Collection?

Anyone have a good rule of thumb for choosing between different implementations of Java Collection interfaces like List, Map, or Set? For example, generally why or in what cases would I prefer to use a Vector or an ArrayList, a Hashtable or a HashMap? ...

How do you send and receive UDP packets in Java on a multihomed machine?

I have a machine with VmWare installed which added two extra network interfaces. The OS is Vista. I have two Java applications, one which broadcasts datagrams, and one which receives those datagrams. The problem I'm having is that unless I disable both VmWare network interfaces, the receiver can't receive the datagrams. What is th...

What is the best blog for Java development?

Please reply with just one blog per answer to allow the voting system to bring the best/most popular to the top. ...

How to maintain Hibernate cache consistency running two Java applications?

Hi, Our design has one jvm that is a jboss/webapp (read/write) that is used to maintain the data via hibernate (using jpa) to the db. The model has 10-15 persistent classes with 3-5 levels of depth in the relationships. We then have a separate jvm that is the server using this data. As it is running continuously we just have one long ...

Detecting Client Disconnects in Web Services

I'm using the Apache CXF Web Services stack. When a client times out or disconnects from the server before the operation is complete, the server keeps running the operation until it is complete. I would like to have the server detect when the client disconnects and handle that accordingly. Is there a way to detect when a client disconne...

Adding command recall to a Unix command line application

I'm working on a command line application for Solaris, written in Java6. I'd like to be able to scroll through a history of previous commands using the up and down arrows like many Unix tools allow (shells, VIM command mode prompt, etc). Is there any standard way of achieving this, or do I have to roll my own? ...

Importing JavaScript in JSP tags

I have a .tag file that requires a javascript library (as in a .js file). Currently I am just remembering to import the .js file in every JSP that uses the tag but this is a bit cumbersome and prone to error. Is there a way to do the importing of the .js inside the JSP tag? (for caching reasons I would want the .js to be a script impo...

128 bit data encryption using Java

Hi, I need to store some sensitive data by encrypting it with atleast 128 bit key. I investigated into javax.crypto package and found that there are certain Cipher names, like PBEWithMD5AndDES or PBEWithSHA1AndDESede which provides encryption upto 56 bit and 80 bit (http://en.wikipedia.org/wiki/DESede). I referred other guys posts but...

Embedded custom-tag in dynamic content (nested tag) not rendering.

Embedded custom-tag in dynamic content (nested tag) not rendering. I have a page that pulls dynamic content from a javabean and passes the list of objects to a custom tag for processing into html. Within each object is a bunch of html to be output that contains a second custom tag that I would like to also be rendered. The problem is th...

How to lock compiled Java Classes to prevent decompilation

I know this must be very well discussed topic on Internet but I could not come to any conclusion after referring them. Many people do suggest obfuscator but they just do rename classes / methods / fields with tough to remember character sequences but what about sensitive constant values ? For example, you have developed the encryption...

Is Bouncy Castle API Thread Safe ?

Is Bouncy Castle API (http://bouncycastle.org/java.html) Thread Safe ? Especially, org.bouncycastle.crypto.paddings.PaddedBufferedBlockCipher org.bouncycastle.crypto.paddings.PKCS7Padding org.bouncycastle.crypto.engines.AESFastEngine org.bouncycastle.crypto.modes.CBCBlockCipher I am planning to write a singleton Spring bean for basic l...

Is Java relevant in the game industry?

Hi everyone, I'm a web developer/apps programmer who wants to break in the game industry. I used to code in C/C++/C# for desktop apps (mainly database-oriented enterprise apps) but nowadays I mainly do PHP/Ajax for websites. Recently, I try learning java and found it to be a very nice language to work with. I wrote a few simple games o...

Java -> Python?

Besides the dynamic nature of Python (and the syntax), what are some of the major features of the Python language that Java doesn't have, and vice versa? ...

Is there a way to generalize an Apache ANT target?

We have an Apache ANT script to build our application, then check in the resulting JAR file into version control (VSS in this case). However, now we have a change that requires us to build 2 JAR files for this project, then check both into VSS. The current target that checks the original JAR file into VSS discovers the name of the JAR ...

Setting Colors in SWT.

This is pretty simple, I come from a swing/awt background. I'm just wondering what the proper way to set the background color for a SWT widget is? I've been trying: widget.setBackGround( ); Except I have no idea how to create the color Object in SWT? Thanks, Brian Gianforcaro ...

LINQ to Java?

I'm looking for something simlar to linq except for java? any suggestions of where to go? ...

Does Java need closures?

I've been reading a lot lately about the next release of Java possibly supporting closures. I feel like I have a pretty firm grasp on what closures are, but I can't think of a solid example of how they would make an Object-Oriented language "better". Can anyone give me a specific use-case where a closure would be needed (or even prefer...