In my project, we allow customer to write customer specific logic in JSP pages and attach to our product. Right now after deploying .ear file customer copy the custom files under /WebContent/custom directory so that we can refer those JSPs. This is a tedious process for installation, I would like to simplify this.
I tried the following ...
I understand that collections like the Hashtable are synchronized, but can someone explain to me how it works, and at what point(s) access is restricted to concurrent calls? For example, let's say I use some iterators like this:
Hashtable<Integer,Integer> map = new Hashtable<Integer,Integer>();
void dosomething1(){
for (Iterator<M...
i installed S60 5th Edition SDK 1.0 but i cant open project on netbeans? what can i do? maybe install some netbeans plugin.
...
JGraphT has a nice Fibonacci Heap class. How can I use it to implement Prim's minimum spanning tree algorithm?
...
I'm trying to set the text in a label dynamically by calling the setText method whenever a button is clicked. Here is my code:
import java.awt.*;
import java.awt.event.*;
class Date {
public static void main(String[] args) {
new MainWindow();
}
}
class MainWindow {
static Label month = new Label();
static Label...
Given the following code:
public class Outer
{
public final int n;
public class Inner implements Comparable<Inner>
{
public int compareTo(Inner that) throws ClassCastException
{
if (Outer.this.n != Outer.that.n) // pseudo-code line
{
throw new ClassCastException("Only Inners with t...
In my portlet application I have a spring SimpleFormController with a HandleRenderedRequestInternal method that is called when the page loads.
On submitting a form I want the OnSubmitAction to be called and then the HandleRenderedRequestInternal to be called.
Is this possible? At the moment when I submit a form it is going into handle...
I google the error message "getOutputStream() has already been called for this response"
and many people said it is because of the space or newline after <% or %>, but in my code , there is no a space or a newline. I am using tomcat6 on linux.
<%@
page import="java.servlet.*,
javax.servlet.http.*,
java.io.*,
java.util.*,
com.lowagie.tex...
I try to compile a (LWJGL) Java project using NetBeans.
I clicked on the project -> properties and under Libraries -> Compile. I added the Jars location, the source files location and javadoc location.
Still when I try to build the project I get the error:
package org.lwjgl does not exist.
What can I do to resolve this error?
...
Hello All,
I'm currently finding the longest path in a directed acyclic positive-weighted graph by negating all edge weights and running Bellman Ford. This is working great. However, I'd like to print the trace of which nodes/edges were used. Any help? The program takes as input the number of nodes, a source, destination and edge weight...
I have: ubuntu-9.10-desktop-amd64 + NetBeans6.7.1
I just downloaded "Commons HttpClient 3.1 (legacy)" from http://hc.apache.org/downloads.cgi .
I created new application with IDE NetBeans.
I focused on Projects -> Libraries -> Add JAR/Folder and here added commons-httpclient-3.1.jar
By now, I can write "import org.apache.commons.httpc...
I'm writing a java package that will be called by another language (matlab). If my matlab process ends, I want the Java process to keep running. Whenever matlab starts again, it should be able to communicate with the existing running process. So I think I need to have the Java application communicating through sockets in a client/serv...
I haven't worked with Java threads in several years so I have a very basic question about multithreading. I'm writing a java package that will be called by another language (matlab). Matlab is able to instantiate a Java class and run java code.
I want to be able to:
Start multiple threads
Get a list of all running threads
Stop a g...
I use Eclipse and want to import UniProtJAPI to use in my code
I import UniProtJAPI.jar as library in Eclipse that I got out of the zip from http://www.ebi.ac.uk/uniprot/remotingAPI/ .
In my code I want to use the API the following way:
import uk.ac.ebi.kraken.uuw.services.remoting.UniProtJAPI;
System.out.println("UniProt Version = "...
I am tasked with creating a small program that can read in the definition of a FSM from input, read some strings from input and determine if those strings are accepted by the FSM based on the definition. I need to write this in either C, C++ or Java. I've scoured the net for ideas on how to get started, but the best I could find was a ...
In another question I was worried about using a web service that takes a five minutes to complete. I was thinking about using RMI instead of web services for this use case..
but at the end of the day, do both a web service and RMI use a TCP socket for the underlying connection? Is there any reason why a web service call taking 5 min...
I am working on a game in JavaFX and I'm sending people the compiled game once in a while for them to try out. As I'm still in the middle of developing it, I have several pieces of code intended solely for developing/debugging.
One example is a gamespeed slider that is of great use for me while testing, but it is VERY buggy and can onl...
I am trying to make a remove method that works on an array implementation of a list.
Can I set the the duplicate element to null to remove it? Assuming that the list is in order.
ArrayList a = new ArrayList[];
public void removeduplicates(){
for(a[i].equals(a[i+1]){
a[i+1] = null;
}
a[i+1] = a[i];
}
...
Is there a way to generate javadoc comments in eclipse?
...
Are there any alternative to Base64 encoding?
I don't have any issues using Base64, just want to be aware of alternatives.
...