File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes How do i use windows to find a string pattern in one of my .java files? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How do i use windows to find a string pattern in one of my .java files?" Watch "How do i use windows to find a string pattern in one of my .java files?" New topic
Author

How do i use windows to find a string pattern in one of my .java files?

Ana Suvari
Ranch Hand

Joined: Aug 18, 2009
Posts: 43
Since I can't use Jcreator or Eclipse, I am wondering how i can get rid of some debug statements i left in my .java files. I know i can use Notepad but how do i search all my files containing debug statements?

Is there a command in DOS windows to search for patterns in a bunch of .java files???

Please help me.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Start Windows Explorer and use the Search button. You can't use complex patterns but you can certainly search for the word "debug" in your source code.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18707
    
  40

The UNIX tool that does this is called ... grep, which windows doesn't seem to have. However, grep seems to be so popular that if you google "grep windows", you get a ton of tools that claim to do what grep does, except on windows. Maybe one of those grep-like tools might work.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Personally, I always install Cygwin on any Windows machine I'm forced to use. It has grep, along with a bunch of other stuff that you may or may not find useful.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38334
    
  23
What about one of the decent text editors, eg jEdit, Notepad++, Notepad2, which all work on Windows and (I think) will have decent search facilities?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do i use windows to find a string pattern in one of my .java files?