I wanna see if someDate has any day in it. Am I checking it right?
Calendar cal = Calendar.getInstance();
cal.setTime(someDate); // someDate is a Date
int day = cal.get(Calendar.DAY_OF_MONTH);
if(day == 0){
// code //
}
...
I want to make a card game made in Java. People can run it on their pc. They can add their friends to their contacts list and when there are 4 players online they can begin a game by one of the players hosting the game. The players can communicate by text or by voice chat Think of it like a chat client that allows users to play a card g...
I'm searching for a way to download Java 5 for Mac OS 10.6. Where can I find this? Sun's site didn't have it for the Mac, and the Mac site only had it for older versions of OS X.
Thanks much.
...
I am writing a client for my EJB and when trying to execute it, I get the following exception :
javax.naming.NoInitialContextException:
Need to specify class name in
environment or system property, or as
an applet parameter, or in an
application resource file.
I just can't understand what the problem is. I've been at this f...
I've been asked to work on changing a number of classes that are core to the system we work on. The classes in question each require 5 - 10 different related objects, which themselves need a similiar amount of objects.
Data is also pulled in from several data sources, and the project uses EJB2 so when testing, I'm running without a con...
Hi,
I am using one simple code to access the SQLite database from Java application .
My code is
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class ConnectSQLite
{
public static void main(String[] args)
{
Connection connection = null;...
Hi!
I have one servlet taking care of multiple sites and therefore I want to have different sessions for different sites, even if its the same user.
Is there any support for this in Java or do I need to prefix the attribute names instead? I guess prefixing is not a good idea.
/Br Johannes
...
There are many RIA frameworks popping up (flex, extjs, gwt to name very few).
If my server is written in Java, why not use java web start?
The benefits I see: I get to program in a language that is easy to debug (compared to javascript), I can use the same code in server and client side (validations, model objects). With SWT I get ni...
Is there any way to share a session between a java web app and an AIR app that uses blazeDS? The goal is some kind of single sign on, so when either one of the apps is logged into that the user would not need to log into the other. They're both running in the same tomcat, but they are different apps.
...
I want the pagesource of home page of ORKUT (http://www.ORKUT.com) in java.
But it needs to be logged in to the ORKUT before accessing any page of it. How can I do it. It should not involve browser in between
...
Hi, so I was having a problem parsing a date, using the JodaTime chronology IslamicChronology so wrote a small example to demonstrate my problem.
Here's the code:
import org.joda.time.Chronology;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.chrono.IslamicChronology;
im...
Hi i am getting this exception when ever i am trying to login to the application
javax.servlet.ServletException: com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl (Unsupported major.minor version 49.0)
Can anybody help..??
...
Hello everybody!
I have to dessign a new harware with a uP (not determined yet) to run JavaME applications.
I've searched information about how do it, but for the moment it has been useless.
Anyone could explain how I can do it?
From what I found in my search:
- Using a uP (ARM for example) with an OS (ie: Linux) (using JIT for better...
Hey guys,
I am trying to work ahead in my algorithms class this year :D and I am doing the class work (so its not marked or assesed as such but just for practise i suppose leading up to a piece of coursework)
Anyway - we have been given a list of names in notepad that take the following format
"surname, firsrname"
and each item is gi...
These are the tables I want to map using Hibernate:
user (PK UserId)
article (PK ArticleId, FK CreatorUserId)
category (PK CategoryId, FK ParentCategoryId)
I have been looking at the documentation for Hibernate, but I really cannot choose what type of mapping is the most suitable for my tables.
Any help would be greatly appreciated! ...
Hello.
I am trying to do a very simple command line library for interactive Java programs. You start the Java program and it prompts you for commands. The syntax is:
> action [object_1, [object_2, [... object_n] ... ]]
for example:
> addUser name "John Doe" age 42
Here action = "addUser", object_1 = "name", object_2 = "John Doe", ...
How do I cancel a long running postgres query via JDBC or Java?
The usecase would be that an user starts a query on a postgres database
via a front end, but then he decides otherwise and wants to
abort/cancel the currently running query.
...
Hi does anyone know how to create a message listener using IBM MQ? I know how to do it using the JMS spec but I am not sure how to do it for IBM MQ. Any links or pointers are greatly appreciated.
...
Let's say that you have the following Facelet ( Using Facelets 1.1.12 ):
edit_item.xhtml which i access with edit_item.jsf
Now i have another page sending me to edit_item.jsf with the GET-paremeter ID the uri looks like this: http://mysite.com/edit_item.jsf?ID=200
How do you access a Bean and fetch the Information, and display this o...
I am developing a domain-specific application library in Java and C#. I'd like suggestions or experience from those who have done or thought about this. I've expanded (hopefully not too much) below.
These choices are givens (use of J#, Python, etc. is not in-scope). The Java library interfaces with a large Open community with many compl...