Top.Mail.Ru
December 12th, 2005 - Java developers — LiveJournal
? ?

Java developers

December 12th, 2005

11:50 am - jojobear99 - Date object for sunday of current week?

How would I get Sunday at midnight of the current week (we can assume UTC) into a java.util.Date object? It looks like I probably need to make a GregorianCalendar object and convert that into the Date object using getTime()--but I can't figure out what I need to do to figure out which constructor to use and what parameters I need to set in the GregorianCalendar. That and I couldn't find any functions for doing math on a time, because what I'm trying to do is convert a timestamp that is merely seconds into the current week into a proper timestamp relative to "the beginning of time" so that it prints out as 2005 and all that good stuff. Any pointers in the right direction would be much appreciated

01:24 pm - ska_o - Executable jar and heap size limit

Is there a way to increase the heap size limit when the JVM is started by double-clicking on an executable jar file (Windows)? I'm guessing no, but maybe I missed something.

I've written a simple Swing application, and the best way to distribute it, apart from this heap size limit, would be an executable jar.

Thanks in advance.
Powered by LiveJournal.com