java

Performing an action after a RowSort operation

I have a JTable and a TableRowSorter which I'd like to perform an operation after a sort is finished. I've been browsing the net, and so far I haven't had much luck. Initially I thought just a RowSorterListener would do the trick, but unfortunately it doesn't perform the operation after the sort is finished. Adding a MouseListener to t...

Should an OpenIDE FileObject be closed after creation?

When creating modules on the NetBeans platform, the FileObject object represents a file in the virtual file system of the IDE. Creating new FileObjects is simple, but does NetBeans completely control the reference to the actual File, or should I close FileObject myself? My code is like this: FileObject appRoot = FileUtil.getConfigRoot()...

How do I get Maven to find org.osoa.sca.annotations.Remotable from Apache Tuscany?

I'm trying to put together an extremely simple proof-of-concept, but I can't get Maven to find any of the Tuscany SCA stuff. TIA. ...

scalable user directory architecture

I was recently tasked with architecting a new scalablable user phone directory. Basically you'll have phone resellers logging into a portal and selling their phones to customers (who also need to be added into the system). So if I bought 3 phones from the reseller for my family, then each phone is automatically on the network (done by ...

Java Game Programming: JOGL vs LWJGL?

I am currently writing a Turret Defense style game using the GTGE engine, this engine has the ability to use either JOGL or LWJGL to drive the graphics and so I was wondering, which one should I use? What are the pros/cons of each? What factors should I consider when deciding? ...

Start / stop a web application from itself?

Hello to all, I've made a web application using Java, Struts and running over Apache Server and Tomcat. It would be very useful to be able to restart the application from the web. I don't want to restart Tomcat, only this wbapp, the same way as Tomcat Manager does it. Do you know how can I do it? If not, any way to simulate that behavi...

rmi (over ssl): TWO tcp connections?

running a simple example with a minimal server that * has both rmiregistry functionality and a fixed listen port, both correctly in listen * which has a "blocking" (long-sleeping) method - this has been done to actually see what kind of connection is opening with netstat a minimal client * (client only, no callbacks) that connects (a...

Is synchronization necessary for unmodifiable maps?

I'm using JDK 1.4...so I don't have access to the nice concurrency stuff in 1.5+. Consider the following class fragment: private Map map = Collections.EMPTY_MAP; public Map getMap() { return map; } public synchronized void updateMap(Object key, Object value) { Map newMap = new HashMap(map); newMap.put(key, value); map...

Eclipse plugin

I want to develop an eclipse plugin to show some special functionalities with Eclipse Java Editor. Except for these minor changes all other things should be same as a normal Eclipse Java Editor. How to do this? Thanks in advance. ...

Pointers to user profile frameworks in Java

I'm looking for pointers to something that I may be overlooking (or maybe something that Jivebot hasn't yet written for me). What I want is a pre-rolled Java framework for managing user accounts that takes care of most of the common tasks associated with such. For instance, Jfacets is a good approach to automagic view controlling, but y...

secure Oracle connection from java applet

I've written a java applet that connects to Oracle on a hosted server. I have been testing it by connecting by VPN to my hosting service and connecting to the Oracle database. I've done this so I don't have to expose the Oracle db to outside connections, but now I need to be able to connect to Oracle without being on the VPN. Is there...

iText cell borders cutting through text

I am writing a program that generates a pdf or rtf file with a table in it, using iText. I used the iText class table and cell, rather than the more specific RtfTable or pdfTable so that either file can be generated at the end. I needed to set the cell padding to a value of -1, or else there was too much space between each row of data ...

Should I invest in GraniteDS for Flex + Java development?

I'm new to Flex development, and RIAs in general. I've got a CRUD-style Java + Spring + Hibernate service on top of which I'm writing a Flex UI. Currently I'm using BlazeDS. This is an internal application running on a local network. It's become apparent to me that the way RIAs work is more similar to a desktop application than a web...

what are those files with "~" in java projects?

I've never seen that,internally generated?How does it work? Can check what I meen here: http://issues.apache.org/jira/secure/attachment/12401970/nutch_0.9_OR.patch search "java~" and you can see "java.old" there,what's that again? ...

Eclipse complaining about @Override?

Hi, I have an existing project that uses @Override on methods that override INTERFACE methods, and not superclass methods. I cannot alter this in code, but I would like eclipse to stop complaining about the annotation, as I can still build with maven. How would I go about disabling this error? Note: Due to project requirements, I need ...

JDT eclipse plugin

I want to develop a Java editor eclipse plugin which is slightly different than the normal Java Editor. Is it possible to extend the Normal Java Editor itself? Thanks in advance ...

GWT with JDO problem

I just start playing with GWT I'm having a really hard time to make GWT + JAVA + JDO + Google AppEngine working with DataStore. I was trying to follow different tutorial but had no luck. For example I wend to these tutorials: TUT1 TUT2 I was not able to figure out how and what i need to do in order to make this work. Please look at my s...

Exception handling pattern for this type of situation?

I have 2 APIs from 2 different companies that allow me to communicate with their servers in order to process transactions. I am tasked with creating a generic interface to these APIs. I came up with something like this: IServiceProvider <- ServiceProvider <- CompanyAServiceProvider IServiceProvider <- ServiceProvider <- CompanyBServiceP...

Java Stack/Nest Count

Is there a quick way in java to get the nest/recurse level? I'm writing a function to make a list of Groups and their members. The members can be groups as well. It's possible that we could end up with a circular set of groups/member. I would like to stop at some arbitrary level. I know I could just keep a variable in a higher scope...

Java "tail -f" wrapper

I need to wrap the Unix command "tail -f" in a BufferedInputStream. I don't want to simulate or mimic tail as stated by this question. Rather, I want to use tail, waiting for it to give me a new line. ...