java

What Ubuntu/Debian packages do I need to build with Java+OpenGL?

I want to use JOGL (for Clojure, not Java). There seems to be quite a combination of alternatives for JDKs and OpenGL bindings, and I don't want to use a scatter gun approach and clog up my machine installing too much cruft. Please help me get started! What Ubuntu/Debian packages do I need to install? (starting with sun-java6-jdk, for ...

Best way to stop a JTree selection change from happening?

I have a dialog where each entry in a JTree has its corresponding options in a different panel, which is updated when the selection changes. If options for one of the entries is set to an invalid state, when the user attempts to change to a different entry in the tree, I want there to be an error dialog and have the selection not change....

Entry point for Java applications: main(), init(), or run()?

So far I've been using "public void run() {}" methods to execute my code in Java. When/why might one want to use main() or init() instead of run()? ...

Swing Matisse GUI - cannot add custom made bean to "Other components"

I made a custom ValueObject class with properties (getters/setters) and I need this class for data binding of elements on form. So I want to drag it to "other components" on matisse editor so I can bind it - and nothing happens.... Any similar experiences? The same issue is happening both on NetBeans 6.5 and MyEclipse 7.0M2 ...

Java Binding Vs Manually Defining Classes

Hi, I have a XML schema that I will need to create Java classes for. It is not a particularly large schema, I'd say it will result in around 20 classes. I am trying to weigh up whether to use an automatic binding program (like the one supplied in JAXB or JiBX) or whether to manually write my own classes and use something like XStream fo...

Ehcache and Java

Hi I am using ehCache to store larges amount of data. This cache is accessed about 3 times every second and must be kept up to date. I have a thread that runs which retrieves all the data i need for the cache from the database every minute into a different cache(different cachemanager also). What i want to do is copy the contents of the...

How to convert EJB3 annotations to ejb-jar.xml file configuration?

I am looking for a tool which would create ejb-jar.xml configuration file from annotated EJB3 classes. Something like XDoclet, but for annotations, not tags in comments. ...

how to localise jcolorchooser

As part of a college project we are localising our application. Is it possible to localise swing components such as JOptionPane and if so how? ...

Changing java version

hi, i have a server - client application that runs on java 1.3; i want to change to java 1.6 step by step, meaning first few clients, than rest of the clients and finally server... i was wondering could you direct me to some common problems that can come along and what should i look after? ...

Grouping javadoc methods

I'd like to group the methods in the javadoc for my class. For example: Admin methods: blah1 blah2 Accessor methods: foo1 foo2 Do you know of any way I can achieve this in javadoc? Are there any doclets available for doing this? Thanks, Calum ...

How to connect a Java application through a BlueCoat proxy?

I´m trying to connect a Java application through a BlueCoat proxy, an I´m getting an HTTP status of 407, with a message that says that "credentials are missing"... Does anyone have some Java code to read an HTML page through this kind of proxy, using integrated security? ...

How disable SQL Server jdbc driver logging from a java application?

When I change the application log level to FINE, SQL Servers log also uses it, and, as consequence, I get a lot of unnecessary log messages. How can I turn off SQL Server log messages? ...

Foosball result prediction

In our office, we regularly enjoy some rounds of foosball / table football after work. I have put together a small java program that generates random 2vs2 lineups from the available players and stores the match results in a database afterwards. The current prediction of the outcome uses a simple average of all previous match results fro...

Configuring Compass with Annotated Hibernate

I'm using Hibernate for a Java-based Web Application and want to add full-text search via Compass. Compass is supposed to support that, but fails to provide any useful Getting Started guide. I could figure out that I have to annotate my Entities with @Searchable and the various @SearchableXXX variations and accessing Compass in my servi...

Tomcat - Multiple webapps folders

Is it possible to have multiple folders where I can place applications to be deployed? How are these defined? And is it possible to restrict one folder to just be applications for "domain.com" and no other domain. Thanks ...

How can I handle multiple mouse inputs in Java?

A friend of mine asked me to implement a blue and a red pointer to represent the inputs of two separate mice to expedite a mixing desk scenario for real time audio mixing. I'd love to, but as much as I think it is a great idea, I don't have a clue as to where to start looking for a possible solution. Where should I start researching a ...

Better Understanding an OC4J Stack Trace

I've been tasked with deploying an application built by a third party on an Oracle Application Server, version 10.1.3.0. I've deployed it on Oracle Application Server version 10.1.2.0 without much difficulty. I'm getting the following error: javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: No such dom...

How to make Java execute jars from the current directory in Gnome?

On Ubuntu Linux with Gnome, running my Swing application by double clicking on the jar file in Gnomes file browser leads to errors because required libraries that are dynamically loaded via the Java Plugin Framework (residing in subdirectories) are not found. The base libraries for the framework itself are resolved correctly, as stated ...

jQuery Ajax error resolution

I'm working on a stripes app that uses a bit of jQuery to make the UI more dynamic/usable. I set up an Error Resolution, so if an error is thrown, the user is redirected to an error.jsp page. However, if an error is thrown during a jQuery Ajax call, instead of redirecting to the error.jsp page, I get html printed to the page where the ...

How can I provide context to a URLStreamHandler?

Our application defines a URL scheme whose resolution is context-sensitive: The content of the URL depends on the state of an in-progress database transaction. As such, to retrieve the content I cannot, for example, open a new database connection. However, I can't see a way to get at external context from the URLStreamHandler instance...