09 May 2004 - java_dev (original) (raw)

Java developers

May 9th, 2004

11:21 am - alistairg - Deleting files in a subfolder Hey all,I want to create a function that clears out a folder ready for other use. So I've been playing around with a small app. First off I managed to get it to delete files in it's own folder no problem (including itself). However, once I tried to get it to delete files in other folders I hit all sorts of problems. It seems from googling that java has problems with using relative file names (i.e. asking to delete "/Reports/hello.t" won't work) so I started to change the working directory using setProperty(). However it is now just failing to delete the files.The code I'm using is inside**( Read more...Collapse )There are lots of System.out.printlns - just to help me try and work out why it isn't workingAny help would be greatfully recievedAlistairEdit: All solved now, thanks :)**
07:41 pm - shinedarklight hey...i'm sorta new to java development. i'm using BlueJ, is that considered to be good software? i'm curious to hear....i'm currently working on a simple cryptography program that utilizes certain linguistic patterns to decrypt simple monoalphabetic ciphers (ie a=P, n=R, d=X ergo and=PRX). Now, i've been working on this approach for a bit now, and i've implemented a 300,000 word dictionary and frequency analysis classes (ie analyzes the frequencies of certain linguistic patterns... (the project ignores intentional mispelling and assumes english...) and a bunch of other classes, but i'm finding it very difficult on a class interaction level, so i'm considering going back to the beginning.....Basically, its pretty complicated, but then i thought: wait, why not just have 26 for loops to plug in all of the possible combinations of the alphabet? (its called brute force). turns out the number of possible combinations is the factorial of 26, which is something like 10 to the 28th. thats an immense amount of calculations, theoretically taking 117 billion years on a typical PC. i was wondering what are some other ideas people have for an approach to this?