java

What's your development environment for JBoss 5 ?

I’m developing application with JBoss AS 5 with a special configuration according to my needs (Web container, ejb3 and JMS) IDE: My Eclipse 6.5 Hardware: Apple macbook 2.3Ghz, 2Gb ram MyEclipse hot deploy works fine, but when I need to change method’s sign or introduced new classes the system ask for a reboot of the JBoss. This slows ...

What is the best IRC network for Java (#java)?

Is efnet the network to be on in #java? Or are there other more active networks? ...

Emulator Framework

Are there any good open source frameworks for developing computer system emulators? I am particularly interested in something written in Python or Java that can reduce the effort involved in developing emulators for 8-bit processors (e.g. 6502, 6510, etc.). ...

Is there a way for a Java enum to have "missing" integer values for its elements?

For example, I have two elements in an enum. I would like the first to be represented by the integer value 0 and the string A, but the second to be represented by the integer value of 2 and the string "B" (as opposed to 1). Is this possible? Currently, my enum is declared as this: public enum Constants { ZERO("Zero"); TWO("Two"...

How to terminate CXF webservice call within Callable upon Future cancellation

Edit This question has gone through a few iterations by now, so feel free to look through the revisions to see some background information on the history and things tried. I'm using a CompletionService together with an ExecutorService and a Callable, to concurrently call the a number of functions on a few different webservices throug...

Java AccessControlException: keeping getting File IO error when trying to write log file

Hi, I keep getting an Java IO exception when the application is trying to initialize the log. Here is the stack trace. /var/lib/tomcat6/logs has permission for anyone to read and write to it. java.security.AccessControlException: access denied (java.io.FilePermission /var/lib/tomcat6/logs/socksserver.log write) java.security.Ac...

How do I build .war file in Eclipse for Glassfish server

I have web application written in java using Eclipse. It has just one servlet that does some file manipulations. How do I build war file so I can easily deploy it to my remote server. ...

Getting the refresh count on server side of GWT web app

I am working on converting the functionality of some JSP pages to GWT. I noticed that javax.servlet.http.HttpServletRequest request is an implied object in JSP, and one can obtain the client's refresh count by calling request.getParameter("refreshCount"). I noticed that one can also access this request object in GWT in the service impl...

J2EE webapp not creating files/folders

Hi All, I have a J2EE webapp that works perfectly when I run it on Eclipse and my local tomcat server (I've also tested on a friend's tomcat server), but not on a production server. This is the problem: The app is supposed to create a folder at a specific location (I've tried hardcoding this as well), but when run on the production s...

Force Look/Feel in SWT

Hopefully no one has asked this question - didn't see it, but I apologize if it's a duplicate. Anyway, I'm building some plug-ins with Eclipse RCP and am using SWT for my UI. I have a Composite that contains some panels and other items - anyway, I've noticed a bit of a difference in the appearance of the UI depending on how my OS is se...

Android custom ListView unable to click on items

So I have a custom ListView object. The list items have two textviews stacked on top of each other, plus a horizontal progress bar that I want to remain hidden until I actually do something. To the far right is a checkbox that I only want to display when the user needs to download updates to their database(s). When I disable the checkbox...

ICEFaces action vs actionListener

I am not clear on the difference between these two methods. I see that the actionListener takes an ActionEvent as a parameter, but both may be tied to a method in the backing bean. Is the only functional difference the ActionEvent parameter? So if I need ActionEvent use the listener method, if not, either will work? ...

What does "generalizes the tag object's storage" mean?

Hi, could anyone please clarify the meaning of line generalizes the tag object's storage of attributes in the following line of Head First Servlets & JSP (page no. 555): One solution would be to put all of the attributes into a hashtable. This generalizes the tag object's storage of attributes, but what about all these setter m...

Catching server side errors inside Ajax form submission

Hi, I am working with a Java application, and I have ajax form submission from a modal window. I would like the code to load either success or error page in the modal depending on the server side processing results. The following code is working for the success scenario only. $.ajax({ type: "POST", ...

spring beanpostprocessor doesn't work on component-scan?

Hi, I have many cookie-cutter spring beans and don't want to explicitly define each one in xml. So I went the component scanning route which lets me do this. This is nice, but I just realized that MyBeanPostProcessor isn't being called for the beans loaded in using the component-scan technique. MyBeanPostProcessor simply attempts to...

Sun Certification Plus vs. "old" certification system

Hi all, a few month ago, I passed the SCJP - the Sun Certified Java Programmer. I intended to do the SCWCD now, but there's this Sun Certification Plus-thing going on... so I don't know if it's worth learning for the SCWCD any more. Does anybody know what's exactly happening? Should I continue with SCWCD/SCJD, ... or should I wait unt...

How to send an iCal meeting request using Java Mail, and recieve the response

I'm trying to send an iCal to an outlook, using Java Mail Library, I've read already the Question, and I already have some sample code public class SendMeetingRequest { String host = "" ; String port = "" ; String sender = "" ; public static SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyyMMdd'T'HHmm'00'" ) ; public static S...

Java, declare variable with multiple interfaces?

In Java, is it possible to declare a field/variable whose type is multiple interfaces? For example, I need to declare a Map that is also Serializable. I want to make sure the variable references a serializable map. The Map interface does not extend Serializable, but most of Map's implementations are Serializable. I'm pretty sure the ans...

Redirect all requests for a subdirectory in Tomcat 6.0

Hello All, I'm running a local Tomcat 6.0 server on my desktop. I'm trying to redirect any and all requests matching http://localhost:8080/RedirectDirectory/abc/efg/morejunk to a single JSP page. In my RedirectDirectory project's web.xml I have <servlet> <servlet-name>IOPRedirect</servlet-name> <jsp-file>/RedirectDirectory/filetree....

Java Runtime.getRuntime() problem

I'm having some problems with getting the .getruntime.exec() to work properly. Here is the code dealing with that part: while (line != null) { String name = line; String commandFull = commandFirst + name + commandLast; String[] fullCommand = new String[] {commandFirst, name, commandLast}; for(int i=0;i<3;i++) { System.out...