Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

TreeMaps, Collections, Arrays...

  Asked By: Viveka    Date: Mar 27    Category: Java    Views: 868

The program is mostly done and does compile but doesn't give the
correct output. The problem seems to be in the main where I am
supposed to write some kind of a loop to get file names: i.e.

To save you some tinkering with the body of the loop you will be
writing in main, here's a hint. For a TextFile object tf , the String
you want to print is

tf.getOwner() + '\t' + tf.getSize() + '\t' + tf.getModDate()

Anyway if someone does want to run this code you will require the
Terminal.jar to be installed in this folder


or %JAVAHOME%\jre\lib

located here


and these files located here which will be in the same folder (not


So the output is this so far:


Process Directory finished

The main does reveal two files in the directory in two places but
when asked for the names and other information I am getting nothing
but what you see here.

Here is the whole program. If anyone can spot a few errors or bugs
please point them out. I will have to continue troubleshooting this
program until I get the desired output. The desired output is found
just above the main in doc comments and is called unit testing.



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on TreeMaps, Collections, Arrays... Or get search suggestion and latest updates.