java

Where to put the external jars?

Hello, i use eclipse (3.4) an my class compiles without warning nor errors. My project uses an external jar file. Where do i need to put this external jar file in order not to get a java.lang.NoClassDefFoundError when using this class from another project (not in eclipse)? Edit: I could just extract the jar into the project folder, bu...

I need some help in Undo function in Java

I write a Text Editor with Java , and I want to add Undo function to it but without UndoManager Class , I need to use a Data Structure like Stack or LinkedList but the Stack class in Java use Object parameters e.g : push(Object o) , Not Push(String s) I need some hints or links . Thanks ...

What is the best resizable circular byte buffer available in Java?

I need a byte buffer class in Java for single-threaded use. I should be able to insert data at the back of the buffer and read data at the front, with an amortized cost of O(1). The buffer should resize when it's full, rather than throw an exception or something. I could write one myself, but I'd be very surprised if this didn't exist y...

Difference between value and itemvalue

What is the difference between the value and itemValue attribute of the radiobutton in Jsf? ...

Secure Java SOAP web service - Active Directory authentication Trust

I want to build a secure web-service betweeen a Java producer and a Java consumer. I want to authenticate using Active Directory using the domain accounts that the producer and consumer are running under. Could you give me an example of this? (ie: AD trusted automated alternative to manual keystores.) ...

Aspect-oriented programming in Java

What is the best tool for Java for aspect-oriented programming? The requirements for a tool are of course IDE support, expressiveness and proper documentation. ...

TextField "umlauts" are not shown on linux

Java 1.5, Linux I do have a screen which contains different textareas and textfields. I do have acess to the application frame, but not to the components inside the frame, because i only get an implementation of an interface. When i try to add german umlauts i see a rectangle in the text component, because the character is not supporte...

How to use setspn to enable two java command line processes to authenticate windows process execution identity

Assuming I have a client and a server java process running on the commandline. I want the identity of each to come from the windows process it is executing under (in order to associate permissions in AD groups). Assuming I have a working knowledge of setspn http://technet.microsoft.com/en-us/library/cc773257(WS.10).aspx How do I get th...

Eclipse coding style checks as an Ant Task?

In Eclipse I can set all kinds of preferences for coding style. I'd like to be able to enforce these as an ant task to make the build break. Can anyone give me an example of how to enforce eclipse coding styles in an Ant task? (I KNOW about PMD, checkstyle etc - none of these EXACTLY match the eclipse preferences for coding style. I w...

What is the Constant Value of the Underline font in Java ?

What is the Constant Value of the Underline font in Java ? Font.BOLD bold font Font.ITALIC italic font What is the UNDERLINE font Constant ? I try all the available constants but it didn't work . ...

Is there any (real) Office 2007 look and feel for Java/Swing?

I'm aware of the Substance look and feels and that they have a Office 2007 look-a-like look and feel. But this look and feel doesn't look like the Office 2007 design at all, the colors are a lot different for example. Are there other look and feels which mimic the Office 2007 more accurately? ...

Looking for recommendations on open-source Java instrument visualization components

I am putting together an Java application that needs to display some basic lab instrument components. For example, I'd like to display: a strip chart, oscilloscope-style trace, and a panel meter (galvanometer needle). Rendering requirements are open (as long as the engine is free and generally available). Any suggestions? ...

How to create a Java String from the contents of a file

I've been using this idiom for some time now. And it seems to be the most wide spread at least in the sites I've visited. Does anyone have a better/different way to read a file into a string in Java. Thanks private String readFile( String file ) throws IOException { BufferedReader reader = new BufferedReader( new FileReader (fil...

java background/daemon/service cross platform best pratices

Howdy I am looking for the best way to make my desktop java program run in the background (daemon/service?) across most platforms (Windows, Mac OS, Linux [Ubuntu in particular]). By "best way" I am hoping to find a way that will: 1) require a minimum amount of platform-specific code. 2) not require the user to do anything a general co...

Eclipse debug-time classpath problem: How do you include a dependent project's output into a web project's runtime classpath?

So I started with a web services project (just a dynamic web project) that builds and debugs correctly from eclipse. We've pulled a chunk of common code out that we want to put into a shared library so now those classes are going into a separate jar project that the web project references. On the web project, I did Project->Properties-...

JInternalFrame Does Not Fully Maximize Under Mac OS X

I'm working with JInternalFrame's under Mac OS X Java 5 and when maximizing a JInternalFrame within a JDesktopPane the window doesn't fully maximize, but the property to allow maximizing is definitely set to true. This is the result I'm getting when maximized: Seeing as though the image previews didn't work. I've got no idea why it's ...

How do I setup up JFileChooser for single click behavior in java Swing?

Hello How do I change the JFileChooser behavior from double-click selection to single-click selection mode? I'm developing an application to run with either a single-click interface (nothing requires a double-click, just like the KDE interface mode) or a double-click interface (the default Windows interface mode or the regular GNOME in...

JUnit gives no information regarding "errors"

I'm using Junit 4.4 and Ant 1.7. If a test case fails with an error (for example because a method threw an unexpected exception) I don't get any details about what the error was. My build.xml looks like this: <target name="test" depends="compile"> <junit printsummary="withOutAndErr" filtertrace="no" fork="yes" haltonfailure="yes" show...

Why is it not advisable to use JavaScript in JSP?

Why is it not advisable to use JavaScript in JSP? One rationale that I can think of is turning off the feature in browser would stop the code from executing. Is there any other reason behind this? ...

Any real-world experience of the "ZK" Ajax framework?

Does anyone have real-world experience of ZK that they can pass on? The marketing blurb on their web site makes it all sound too good to be true. Any issues with performance, browser compatibility, tooling, widget availability, etc? ...