Top.Mail.Ru
January 29th, 2005 - Java developers — LiveJournal
? ?

Java developers

January 29th, 2005
Image

01:25 am - Imageakktri - Hourly image updater?

I'd like to know some Java code for a 24 hour image recycler.
What I want to do is have an image on a website appear at 4:00pm and not at 5:00pm, and have a different picture there at 12am than is there at 11pm.
All I want is to be able to have a user's computer visit my site at various hours of the day and get to see one of twelve or twenty four images.
AM or PM doesn't matter too much, though it would be nice if the code could differentiate between day and night.
It's like a random image generator, but it's not at all random. You simply have to visit the site at the hour specified in order to see certain images with their respective links.
What java code can I use for this?
Image

08:48 am - Imagejaq - which servlet engine?

I want to put a servlet engine on my home server to play with things - but it's an old fairly low spec machine by today's standards (Pentium II, 256Mb RAM), so I want to choose one with a 'small footprint'. Is there much difference between Tomcat, Jetty, Resin? Or is it all irrelevant because the JVM is going to be the main hog?
Image

05:28 pm - Imagejizmunci - hello

hello everyone, I am new to Java and to this community.

Could somebody take me through reading from input streams? I think I've started to lose the plot but...

I so far have things that look similar to this:

"BufferedReader empReader = null;

try
{
FileInputStream empStream = new FileInputStream ("employee.dat");
InputStreamReader inemp = new InputStreamReader(empStream);
BufferedReader empReader = new BufferedReader (inemp);
}

catch (FileNotFoundException e)
{
System.out.println ("Could not open employee.dat");
}

catch (SecurityException e2)
{
System.out.println ("You can't read employee.dat");
}

try
{
String line = empReader.readLine();
}

catch (IOException)
{
System.out.println ("sorry, IO exception");
}
"
Powered by LiveJournal.com
Image