I have created a class that extracts all files within a built EAR application, within this EAR there would be additional archives that exist that also would need extracting.
I am having trouble extracting jars and zip files that have files in multiple level of directories e.g...
No error is shown if you are over writing a file, I thought that was odd!!
Is there any way to ensure that the extension gets appended should it be removed?
Thanks for the help it is greatly appreciated :)
I have a GUI application that includes a save file JFileChooser function. I have included a default save file name but everytime I click on a different directory to save the file in, the name in the save as text field dissapears (it doesnt do this in eclispe) forcing the user to type in a new...
Make a brew first!
I am creating some classes that calculate the checksum of all files within a ear archive and saves these results to a report.txt file. It works a treat and computes a checksum for all files even if there are within a directory, within a directry etc.
The problem I am having...
Hi,
I have created a class that executes an ant script. If the ant does not require an input it works fine. However, sometimes the script will ask a qustion from which the user must type either y or n followed by return.
When my class runs this file it hangs when it gets to this bit.
I...
I want to work out the time difference (in hours) between and and 18:00.
I have tried:
Date futDate = new Date("23/05/2006 18:00:00");
long currentTime = System.currentTimeMillis();
long futTime = futDate.getTime();
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss")...
I have two columns in a table start_time and end_time (stored as datetime). I wish to work out the time difference in minutes between these two values. If the difference is 1hr 30 minutes I wish to get 90 (mins)
I have tried:
SELECT TIME_FORMAT(TIMEDIFF(start_time, end_time), '%i') FROM table...
Ahh, no it doesnt and works a treat when it is there. My low point of today!!!
Is there a way of creating the directory if it does not exist?
Thanks :)
I wish to save a file if i put c:\\file.txt, the file is saved in the c: drive, however if i put c:\\dir\\file.txt it doesnt work. What am I doing wrong? (I am working on Windows 2000)
try {
out = new BufferedWriter(new FileWriter("c:\\file.txt, true));
out.write(new Date() + " : " +...
I have two field in a db, one called begin_time and one called end_time they are both stored as datetime types.
currently two entries are:
begin_time end_time
2007-04-12 12:18:00 2007-04-12 14:39:00
I need to work out the difference in hh:mm:ss between the begin and end times...
For anyone who will be looking at this thread I patched this together:
import java.util.*;
import java.text.*;
public class month {
public static void main(String[] args) throws Exception {
DateFormat myDate = new SimpleDateFormat("dd/MM/yyyy");
Calendar cal =...
Thanks for that but when I do a System.out.println(cal) I get all the date information in the world.
Is there a way to extract the Calendar.MONTH and assign it to a variable?
Thanks again
Hi there,
I have the following code:
DateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
System.out.println(sdf.format(new Date()));
that prints the date in a given format. In this class I have an intand based on that int I would want to increase/decrease the date by that value. E.g...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.