Error starting Tomcat server

Java
I'm trying to create a web service and deply it on Tomcat. I'm following this tutorial. I'm using Eclipse Europa. But when I try to start the server...
2 years ago

How can I convert a String date with full month names to a Date object in java?

Java
How can I convert dates with full month names into a Date object in Java? Here's a sample date that I need to convert: 6 December 2002. Thanks.
2 years ago

Java: What's the difference between Thread start() and Runnable run()

Java
Say we have these two Runnables: class R1 implements Runnable { public void run() { … } … } class R2 implements Runnable { public void r...
2 years ago

how to replace filepath ,In that filepath delete some path and also replace \ to /

Java
fi.write(file); out.println("filepath"+file.getAbsolutePath()); System.out.println("above is actual paht and bellow are replace path"); String proPic ...
2 years ago

Java XML processing entity problem?

Java
I get the following error when I try to run my java program(it's supposed to read an xml file and print out some of the content). From what I underst...
2 years ago

How to pass different objects (having same parent) to a constructor and how to identify type of that object in constructor

Java
I have a scenario where I'm sending different objects to a constructor and I have to identify the class of that object and set values accordingly. C...
2 years ago

toString() function for JPA relations

Java
I have two JPA Entity classes, Task and TaskList. There's a one-to-many relationship between Task and TaskList(obviously) with the tasklist_id foreign...
2 years ago

Round a double to 2 decimal places

Java
If the value is 200.3456, it should be formatted to 200.34. If it is 200, then it should be 200.00. ...
2 years ago

Choosing the initial capacity of a HashSet with an expected number of unique values and insertions

Java
Ok, here's my situation: I have an Array of States, which may contain duplicates. To get rid of the duplicates, I can add them all to a Set. However...
2 years ago

Does double-checked locking work with a final Map in Java?

Java
I'm trying to implement a thread-safe Map cache, and I want the cached Strings to be lazily initialized. Here's my first pass at an implementation: p...
2 years ago

Java HashMap performance optimization / alternative

Java
I want to create a large HashMap but the put() performance is not good enough. Any ideas? Other data structure suggestions are welcome but I need the...
2 years ago

Explanation of Red-Black tree based implementation of TreeMap in JAVA

Java
I was going through the source code of TreeMap in JAVA. As per JAVA doc: A Red-Black tree based NavigableMap implementation. The map is sorted ac...
2 years ago

Java replace method problems

Java
I am trying to do a project for my computer science class called "Encryption/Decryption" The code goes as follows import java.io.*; import java.uti...
2 years ago

Add loading circle to JTable

Java
I have a JTable that loads data from a database. Because sometimes there's too much data, I would like to add a loading circle inside the Jtable to no...
2 years ago

Android ScrollView Icons

Java
I am developing an app using the scroll view but I have problem. The first button is not visible entirely when I scroll to the top here is my xml and ...
2 years ago

java.util.IllegalFormatConversionException: f != java.lang.String Error

Java
import javax.swing.JOptionPane; public class Minutes { public static void main(String[] args) { double BasePlanCost = 20; final...
2 years ago

How do I convert a byte array with null terminating character to a String in Java?

Java
How can I create a String object from a byte array byte arr[MAX_SIZE]; // Java where one of the array elements is a C null terminating byte? Is i...
2 years ago

Why can't enum's constructor access static fields?

Java
Why can't enum's constructor access static fields and methods? This is perfectly valid with a class, but is not allowed with an enum. What I'm trying...
2 years ago

Matching (Basic) Function Declarations

Java
I want to retrieve all function definitions individually from a source code file. Ultimately, I want to just retrieve all function names. Source files...
2 years ago

IntelliJ IDEA with Junit 4.7 "!!! JUnit version 3.8 or later expected:"

Java
When I attempt to run the following test in IntelliJ IDEA I get the message: !!! JUnit version 3.8 or later expected: It should be noted that th...
2 years ago