Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. bobrivers2003

    Problem extracting .jar and .zip with directory structure

    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...
  2. bobrivers2003

    2 FileFilter issues.

    That sound logical and something I can do! I really appreciate the help Miros, timw and Dian. Cheers :)
  3. bobrivers2003

    2 FileFilter issues.

    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 :)
  4. bobrivers2003

    2 FileFilter issues.

    ...the user removes the extension from the "save as" name, the extention does not get added. E.g. "file.html" gets changed to "file" with a filter of *.html gets saved as "file". ... fc.setFileFilter(new FileFilter() { public boolean accept(File f) { if (f.isDirectory()) { return true...
  5. bobrivers2003

    Hashtable ClassCastException

    Stacktrace?
  6. bobrivers2003

    Hashtable ClassCastException

    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...
  7. bobrivers2003

    Automate command promt input

    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...
  8. bobrivers2003

    Working out time difference between now and 18:00

    Thanks alot Dian that has beena great help. :)
  9. bobrivers2003

    Working out time difference between now and 18:00

    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")...
  10. bobrivers2003

    Calculating Time Difference In Minutes between 2 times

    Thank you r937. It works a treat :)
  11. bobrivers2003

    Calculating Time Difference In Minutes between 2 times

    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...
  12. bobrivers2003

    FileWriter Wont Write To Directory

    Thank you very much that is a great help :)
  13. bobrivers2003

    FileWriter Wont Write To Directory

    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 :)
  14. bobrivers2003

    FileWriter Wont Write To Directory

    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() + " : " +...
  15. bobrivers2003

    Find difference between two time enteries

    timediff(), fantastic function!! It also works for periods greater than 24hrs. Thanks alot for the advice people :)
  16. bobrivers2003

    Find difference between two time enteries

    hey there, the version is 4.1, and the difference will only ever be a couple of hours Thanks :)
  17. bobrivers2003

    Find difference between two time enteries

    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...
  18. bobrivers2003

    Increase date by given int

    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 =...
  19. bobrivers2003

    Increase date by given int

    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
  20. bobrivers2003

    Increase date by given int

    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...

Part and Inventory Search

Back
Top