java

What are the best Java social networking frameworks?

I would like to create a private customized social networking for my company employees and partners so that they can collaborate, exchange messages, share experiences (events, book references, etc) and be grouped into communities. Does anybody know good Java framework for start developing this? I would be looking for something that wou...

How to get the page count of a microsoft word document in java?

Hi, for a server based j2ee application, I need to retrieve the number of pages from word documents.. any ideas what works? ...

How do I control the display of a JComponent's Tooltip?

I have a JComponent that's painting various shapes on itself. I'm detecting whenever the mouse enters one of these shapes and changing the tooltip accordingly. The problems I'm having are: The tooltip doesn't follow the mouse as the user tracks the mouse across the shape. It stays where it was first set and then only jumps whenever ...

JSF : How to update one session bean base on another session bean?

I am currently modifying some jsf application. I have two beans. connectionBean UIBean When I set my connection parameters in connectionBean the first time, the UIBean is able to read my connectionBean information and display the correct UI Tree. However when I try to set the connection parameters in the same session. My UIBean will...

How do I bind collection attributes to a form in Spring MVC

I'm trying to bind one of my model objects to the fields of a form, using Spring-MVC. Everything works fine, except that one of the attributes of the model object is an unordered collection. Doing something like <c:forEach items="${m.items}" var="i" varStatus="itemsRow"> <form:input path="items[${itemsRow.index}]"/> </c:fo...

Best way to select out of millions of rows in an Oracle DB

G'day! I have one million different words which I'd like to query for in a table with 15 million rows. The result of synonyms together with the word is getting processed after each query. table looks like this: synonym word --------------------- ancient old anile old centenarian old darkened ...

Default Handler implementation breaking on nbsp

I have an implementation of default handler. When it gets to a   in the character data it stops parsing. Is there any reason that it is doing this? Are there additional properties that I need to set in order for it to deal with &nbsp? ...

Can we use JUNIT for Automated Integration Testing?

How do you automate integration testing? I use JUnit for some of these tests. This is one of the solutions or is totally wrong? What do you suggest? ...

Any command line format tool available for java file?

We are working on a legacy system(7 years old), with lots of java/jsp files that have never been formatted before, not reader at all. Because we have many old versions, we are afraid that we won't be able to effectively diff unformatted and formatted files anymore if we format them. Question is: are there any command line format tools a...

How do you add an ActionListener onto a JButton in Java

private JButton jBtnDrawCircle = new JButton("Circle"); private JButton jBtnDrawSquare = new JButton("Square"); private JButton jBtnDrawTriangle = new JButton("Triangle"); private JButton jBtnSelection = new JButton("Selection"); I would like to add action listeners to these buttons, so from a main method I can call actionperformed on ...

how can i get javac to search child directories of classpath?

I have 3 files: /a/A.java /a/aa/AA.java /b/B.java and B.java depends on A.java and AA.java. I basically want javac -classpath /a /b/B.java to work (i.e. have javac search below /a). Is there any way I can do this? ...

Log4j Logging to a Shared Log File

Is there a way to write log4j logging events to a log file that is also being written to by other applications. The other applications could be non-java applications. What are the drawbacks? Locking issues? Formatting? ...

Is it possible to get calling page name inside a jsp 2.0 custom tag?

I'm writing a custom JSP tag using the JSP 2 tag files. Inside my tag I would like to know which page called the tag in order to construct URLs. Is this possible with out passing it through an attribute? ...

What is the best way to interface C# and Java?

Hypothetically, you have two products, one written in Java, the other in C#. You like the Java based backend (non-user visible portion), but would like to use the C# (WPF) frontend. What is the best way to go about interfacing them? Note that the backend must be able to run on either a server or on the local machine and the frontend sh...

What is Java's answer to WPF?

I'm mostly a .Net person at the moment, but I've been playing with Java some lately-- exploring what's out there. Now I'm looking for the Java equivalent for WPF. I know I could find an OpenGL library or two out there, but that's not really as rich or simple as the WPF system. ...

How do I call one constructor from another in Java?

Is it possible to call a constructor from another (within the same class, not from a subclass)? If yes how? And what could be the best way to call another constructor (if there are several ways to do it)? ...

How to convert UTF-8 to US-Ascii in Java

We have a system where customers, mainly European enter texts (in UTF-8) that has to be distributed to different systems, most of them accepting UTF-8, but now we must also distribute the texts to a US system which only accepts US-Ascii 7-bit So now we'll need to translate all European characters to the nearest US-Ascii. Is there any Ja...

Does a Javascriptable FTP Upload Java/Flash Applet exist?

To be able to upload large files from a HTML page to a FTP server, I am looking for a Java/Flash FTP upload applet. I really like the way dhtmlxVault works, but I need it to upload to a FTP server instead of a HTTP file upload. It would be really nice if the applet has no GUI of it's own, but instead is fully scriptable using Javascrip...

How can I alter the signature of a member function for a derived class in Java

Firstly I'm extending an existing class structure and cannot alter the original, with that caveat: I would like to do this: class a { int val; ... // usual constructor, etc... public int displayAlteredValue(int inp) { return (val*inp); } } class b extends a { ... // usual constructor, etc... public in disp...

"Holds value of property" in Java code

I got some legacy code with that caption spread out as comment almost in every field. Also appearing is "Setter for property xyz". Just out of curiosity, which Java tool generated this stubs? ...