Hi,
While trying to transform the date format I get an exception:unparseable date and don't know how to fix this problem.
I am receiving a string which represents an event date and would like to display this date in different format in GUI.
What I was trying to do is the following:
private String modifyDateLayout(String inputDate){
...
Is there any reason why an array in Java is an object?
...
We normally create objects using the new keyword, like:
Object obj = new Object();
Strings are objects, yet we do not use new to create them:
String str = "Hello World";
Why is this? Can I make a String with new?
...
char c=7;
The above statement will execute in java without error even though we are assigning a number to character. where 7 is not a character .Why will it execute?
...
I'm a java newbie, want to test out some hibernate goodies!
I have netbeans installed, and I included the Hibernate libraries.
I then created a new package named Model.
I will drop my Class and xml config files in there.
Do I need a special library to connect to sql server? (windows machine)
...
Hi,
I'm considering developing a school information system using the Grails web framework. Before a school can use the system, they will need to setup the following data
School data
Students
Teachers
Subjects
Classes
etc.
I'm considering using a CMS in order to get the ability to CRUD these entities "for free". The CMS may also pro...
java application uses hsql to store data, can I .net application odbc to that?
...
Hey guys
I have tried to create a android application that sends a serialzed object from the phone to a servlet the contents of the object is the input from the user which i will store in a database using hibernate. I believe the problem is around the serializing and deserializing of the object the code is below. If anyone could help i ...
Is any practical way to reference a method on a class in a type-safe manner? A basic example is if I wanted to create something like the following utility function:
public Result validateField(Object data, String fieldName,
ValidationOptions options) { ... }
In order to call it, I would have to do:
valida...
Say I have a Customer - CustomerOrder one-to-many bi-directional relationship with the CustomerOrder holding the total value of each order.
If I had a query to find the total value of all orders for a particular customer :
select SUM(o.orderValue) from CustomerOrder o where o.customer = :customer
Does it matter in which entity class ...
I can't find an easy way to turn off word wrap in a JTextPane. I can't use JTextArea because I need different colors for different text. I have these big ugly lines that get uglier with word wrap turned on.
JTextArea has a setLineWrap() method, but I can't find it for JTextPane. Why?
...
Using Groovy (or Java) how can I convert a org.joda.time.LocalDateTime to a java.util.Date?
import org.joda.time.*
Calendar cal = Calendar.instance
cal.set(Calendar.DATE, 1)
cal.set(Calendar.HOUR, 0)
cal.set(Calendar.MINUTE, 0)
cal.set(Calendar.SECOND, 0)
cal.set(Calendar.MILLISECOND, 0)
Date startOfTheMonth = cal....
Hi Everyone
I'm using Netbeans and I want to grab the latest hibernate artifact from the jboss maven repository.
I have added the repository in netbeans, and I can navigate to it within the repository browser.
After I add this dependency to my pom.xml file and attempt to build my project, I get an error saying that the artifact coul...
Hello, I am trying to implement an inner class that has generic parameterized type.
Here is my code (short version):
public class AVLTree<T extends Comparable<? super T>> implements Iterable<T> {
...
private class BinaryNode<T extends Comparable<? super T>> {
...
}
private class TreePreOrderIterator<E extends Comparable<? super...
We have a java widget that does some basic parsing on arbitrary xhtml documents, and we've been using jTidy to clean them up before processing.
For a couple of reasons (which are outside the scope of this particular question,) we're looking to replace jTidy with a different library.
Can anyone recommend something? We're looking for so...
will netbeans or eclipse install mysql for me as a plugin? (preferrably netbeans)
(on a windows machine)
...
I have the following regular expression, that I am compiling with Pattern class.
\bIntegrated\s+Health\s+System\s+\(IHS\)\b
Why is this not matching this string?
"test pattern case Integrated Health System (IHS)."
If I try \bpattern\b, it seems to work, but for the above phrase it does not. I have the parenthesis in the pattern esc...
I am a student and working on developing a Java Application that would serve as a "Translation Layer" between one application's web service calls to another application's JMX API.
Both the applications reside on 2 different systems in the same network.
So, essentially, it involves a deliverable program that converts one application's we...
Is there a way to use JSpinner.DateEditor with a Buddhist Calendar? When I change my locale to "th", "TH" and recreate my calendars they are indeed Buddhist Calendars. However, the JSpinners are not updated. Here is some sample code:
Locale locale = new Locale("th", "TH");
Locale.setDefault(locale);
// Reinitializing calendars with n...
I downloaded microsfot's jdbc driver, and I am not sure what the connection.url should be?
<property name="connection.driver_class">org.microsoft.sqlserver.jdbc</property>
<property name="connection.url">jdbc:</property>
..
<property name="dialect">org.hibernate.dialect.SQLServerDialect</property>
i configured sqlexpress to wor...