Hi,
I'd like to create a Windows .exe for a Java program. Previously, I've used JEXECreator for this, but it's not entirely satisfactory because:
The executable sometimes work on the machine on which it was created but not on others
The program is comercial. If you use the trial version it adds a nag screen to your application.
I do...
I'm working on a web project that will (hopefully) be available in several languages one day (I say "hopefully" because while we only have an English language site planned today, other products of my company are multilingual and I am hoping we are successful enough to need that too).
I understand that the best practice (I'm using Java, ...
Hello all, I have a list of strings on my server which I am trying to get to the client in the form of an array. The code I am attempting to use is the following:
Within the jsp I have a List<String> columns.
I am attempting the following code:
<%int j = 0; %>
for(var i = 0; i < <%=columns.size()%>; i++)
{
colArray[i] = "<%=column...
Hi,
can you increment a hex value in Java? i.e. "hex value" = "hex value"++
...
A friend of mine is talking about these design techniques regarding state transitions of an object (he's a Java guru, btw), performed without having a boolean myState member, but rather declaring the myState member as an object that implements the same interface of the "owner" one.
Ok, I've been too much cryptic, so you can find the dis...
Exact duplicate by same poster: http://stackoverflow.com/questions/516291/the-use-of-this-in-java
Hello,
what about using "this" with methods in Java? Is it optional or there are situations when one needs to use it obligatory?
The only situation I have encountered is when in the class you invoke a method within a method. But it is op...
I have a standalone enum type defined, something like this:
package my.pkg.types;
public enum MyEnumType {
TYPE1,
TYPE2
}
No I want to inject a value of that type into a bean property:
<bean name="someName" class="my.pkg.classes">
<property name="type" value="my.pkg.types.MyEnumType.TYPE1" />
</bean>
...and that didn't ...
We are running a large project with several different languages: Java, Python, PHP, SQL and Perl.
Until now people have been working in their own private repositories, but now we want to merge the entire project in a single repository. The question now is: how should the directory structure look? Should we have separate directories for...
I'm currently evaluating ivy, maven and buckminster to ease our build process. Conceptually buckminster seems the most advanced, but also to have quite a complexity.
I can't find so many first hand experiences to buckminster on the web, therefore my question to the Stackoverflow community.
...
Hi guys,
How can I create in a Swing interface a toggle image button?
I have two images, imageon.jpg and imageoff.jpg,and I basically want a clickable element that toggles the images and fires an event.
Update: Is there a way to override the usual 'chrome' around the image? I would prefer a simple image to a button with an image inside...
I have an application in need of some caching, and for some of the semi-static data, I want them to stay in the cache a maximum amount of time (for instance 10 minutes) before being refreshed. My system merely retrieves data, never updates it, so I have no idea of when to flush the cache using the property. In the OSCache docs, such an ...
Hi,
I need a tool which tells the classname of the UI control on which my mouse pointer is. My GUI is in Swing. Does such a tool exist?
...
Usually when defining a DAO, you would have a setter for the datasource on the DAO object.
My problem is that our datasource varies dynamically based on the request to the server. i.e. every request can access different database instance.
The request holds logical properties, that later can be used to retrieve the connection to the DB o...
So I have taken over a Java Web project. The application was written by another developer who now works for another company. Generally speaking, the application is straightforward, well designed and the code is documented enough. The only issue is that the previous developer decided to built his own database access library instead of usi...
Why does the jvm require around 10 MB of memory for a simple hello world but the clr doesn't. What is the trade-off here, i.e. what does the jvm gain by doing this?
Let me clarify a bit because I'm not conveying the question that is in my head. There is clearly an architectural difference between the jvm and clr runtimes. The jvm has a ...
I'm some what lost as to why spring isn't enforcing the @Secured("ROLE_USER") on my service interface. My controllers are established using annotations.
An example of my service Interface
public interface MyServiceManager {
@Secured("ROLE_USER")
public void delete(int cid);
@RolesAllowed({"ROLE_USER"})
public Contact...
I'm trying to implement pop-up menus in Java JTree. I've sub-classed DefaultTreeCellRenderer (to change node appearance) and DefaultTreeCellEditor (to create Components to attach event listeners to, since apparently the Components that DefaultTreeCellRenderer.getTreeCellRendererComponent() returns can't do it?). I don't really want to "e...
I have a method like this:
public static <T> boolean isMemberOf(T item, T[] set)
{
for (T t : set) {
if (t.equals(item)) {
return true;
}
}
return false;
}
Now I try to call this method using a char for T:
char ch = 'a';
char[] chars = new char[] { 'a', 'b', 'c' };
boolean member = isMemberOf(ch, ...
I have Shipment and Product entities. Each shipment consists of any amount of any numbers of products. I.e. a shipment has a field named products which is a java.util.Map where they key is the product being shipped and the value is the number of instances of that product being shipped.
How do I map that to a db with hibernate annotation...
Ok, I've looked up what this does, but does anyone actually have an example of when you would use the "strictfp" keyword in java? Has anyone actually found a use for this?
Would there be any side-effects of just putting it on all my floating point operations?
...