This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Magic!  Magic! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Magic!  Magic! " Watch "Magic!  Magic! " New topic
Author

Magic! Magic!

Moguluri Ravi Kiran
Ranch Hand

Joined: Apr 16, 2010
Posts: 62

Hi something special here

you know how to print all the files names in the current directory with out using File class.
i found this at random. & the output is the list of files in the directory D:\Javap\



if anybody know this before please kindly explain me.

Thanks & regards..


Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Moguluri Ravi Kiran wrote:if anybody know this before please kindly explain me.

How this works: If you use wildcards on the command line, like in your command:

D:\javap>java Magic *

then the Windows command prompt will expand the wildcard character * into all the filenames of the files in the current folder. So a command like that is the same as calling your program with the whole list of filenames:

D:\javap>java Magic A.class a.java Aliase.class Aliase.java ar.class ar.java ...

It's not Java that's doing this, but the Windows command prompt itself.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Moguluri Ravi Kiran
Ranch Hand

Joined: Apr 16, 2010
Posts: 62

Thanks .....
I didnot think that...
mistake...

any way thankyou very much...
 
 
subject: Magic! Magic!
 
Similar Threads
what command
Doubt with object references
question about classpath
j2ee environment in sun server
Help with compiling packages