I want to use Linux grep in my java program for searching, because grep’s performance is satisfying. But I don’t want to call it with Runtime.getRuntime().exec() command from operating system. Therefore I downloaded grep-2.9 source code but now I don’t know how I can integrate that code to my java app. Is there any way to use grep or other linux commands directly, not from OS?
I want to use Linux grep in my java program for searching, because grep’s
Share
I think you should better try this:Grep4J
Another possible alternative is to use groovy they have grep supported by the language library
Both of approaches are better then running linux specific utilities from Java.
Hope this helps