What are the reasons behind the decision to not have a fully generic get method
in the interface of java.util.Map<K,V>.
To clarify the question, the signature of the method is
V get(Object key)
instead of
V get(K key)
and I'm wondering why (same thing for remove, containsKey, containsValue).
...
So I have lots of tables and lots of cell editors, with lots of stuff in them. I figured I should be reusing them, not doing new() every time since the whole thing is set getTableCellEditorComponent() but still, nearly every time I try to do it, I get "leftovers" in old cells, and other oddities. I can usually correct the problem by ju...
I would like to monitor my Java application (running in JRockit) via SNMP protocol. I only need some basic informations. Is there any startup parameter that I can add to my app to enable SNMP?
...
I have a Maven project using the Swing Application Framework and would like to inject project information from the pom.xml into my application's global resources to avoid duplication.
The base application (provided via netbeans) uses Application.title, Application.version, Application.vendor, Application.description resources etc for ...
Hey,
I'm trying to make some simple XML with Java and org.w3c.dom, but I got stuck when I try to append a child to a child, something like this:
<root>
<child>
<childOfTheChild>Some text</childOfTheChild>
</child>
</root>
I tried quite some variations of this (like first appending the child and than creating child...
I'm developing a Java application that uses java.util.logging for its logging needs. This application uses a multitude of external libraries (JDBC, JMS clients, JSR-160 implementation, etc), some of which also use java.util.logging.
I want to set the log level for my Loggers to ALL when I specify a flag on the command line, but so far I...
Is it possible to create a complete fork of a 'PROGRAM' in execution into two sub-programs from a single execution sequence ?
The sub-programs produced are completely identical. They have the same execution sequences and values but now they are two different programs. It is like creating a clone of an Object, thus giving us two differe...
I am a .NET / C++ programmer switching to Java. I had previous exposure to Java 10+ years ago in university.
What would be the typical things to be learned in order to be able to program web applications in Java?
I can think of:
JSP/Servlets
Eclipse
EJB
What else do people use these days?
The idea would be to be able to land on a Jav...
I'm trying to migrate an existing actionscript program (server part) to java (red5).
However, I'm blocked with the following code :
Client.prototype.requestInterview = function () {
};
Does anyone know what is the equivalent of Client.prototype in red5 ?
Thanks in advance,
Massi
...
I've see this sort of thing in Java code quite often...
try
{
fileStream.close();
}
catch (IOException ioe)
{
/* Ignore. We do not care. */
}
Is this reasonable, or cavalier?
When would I care that closing a file failed? What are the implications of ignoring this exception?
...
For homework, I need to build a small java application.The main goal is to learn how to interact with XML. But a second goal is to learn how to build such an application.
I have quite some experience on programming, but little experience in designing programs.
I've read about designpatterns and designprinciples like Solid and TDD. But ...
I am writing an application to remap some of the keyboard keys. I want to add a button so that if the user clicks on it, the input source will change to the next input in the OS. I am using it to input source arabic and english. What should I use, and is it possible to do that in java?
...
How do I securely delete files in java? I tried the code at javafaq.nu, but the problem is you can't actually delete the file on windows once it has been mapped due to this bug.
Then I tried just using sysinternals sdelete on windows, but you have to click a usage agreement the first time you use it which I want to avoid.
...
I created a simple netbeans plugin (see this tutorial) and now i wanna test e.g. the Actionlistener.
But how can this be done ?
to be more specific
what test frameworks suit netbeans plugin development ?
how to create a test setup which emulates enough of netbeans e.g. to test the simple actionlistener ?
Update
a practical example...
I am having some trouble accessing a stateful session bean (SFSB) from an application client. I am using JBoss 5.0.1.GA. The application client and the EJBs are both packaged in an EAR which deploys and I have other application clients which work without problems. So far, I have only used stateless session beans (SLSBs), but as far as I ...
I tried to find a interpretation of the memory segments of the sun java vm, which would also understandable by an administrator. It should explain what heap / non-heap memory is and the significance of the different memory pools.
If it would somehow relate to the jconsole view, it would be a bonus.
Is there somewhere a website with su...
Suppose you have a JTable and for each cell you want to display three strings with different color, say value1 (red), value2 (blue), value3 (green).
I overrode the getTableCellRendererComponent of DefaultTableCellRenderer but setForeground(Color) method gives an unique color for all the string showed in the cell.
@Override
public Compo...
Hello,
I googled,I checked wikipedia.None of them helped me to find an official java compiler by Sun.
By "official" I mean for example "C# Express" by Microsoft.I want that type of compiler by Sun.
My question is: Where do I get it?
I'm very sorry for my stupid question,I just get lost when I open java dot com.
Thanks in advance for...
Hi,
I have a bean which I map to the database using Hibernate. I'm using Hibernate Annotations to indicate the mapping I want, and to create the indices. The thoroughly simplified code is shown below.
The problem I have is that the indices on my byte[] field are not created; specifically that my multi-field index sysUuid does not get c...
Hi all,
I've got an JSP tag that I would like to use in my JSF/Seam application. Could someone please give me some guidance in getting my environment to accept the tag. Can I just point a faclets *.taglib.xml file at my old tag or do I need to write a component extending the previous tag perhaps?
Cheers for any info,
Lee
...