I’m working with eclipse and want to find a specific line that is being output in an error message. The line is not in any code I’ve written, but I believe it’s comeing from a specific library I’ve included. Eclipse is able to navigated through classes within the library so it has the source from somewhere, the jars were fetched from Mavin and I assume the jar it fetched was a source jar?
The problem is that, by default, the simple java search does not search inside of jar’s for lines, and I didn’t see an obvious way to tell it to. IN addition I don’t want to search all the jars, or even all the code within the one suspected jar, for a line as it could take awhile. Is there a way I can tell eclipse to do a text search of every file within a specific package only? Failing that how would I tell it to do a text search of all code within a specific jar?
Thanks.
Eclipse’s ‘File Search’ which you’d need to find arbitrary text in files doesn’t “look into” JARs. Its ‘Java Search’ on the other hand doesn’t look at source code specifically but allows to search types, methods, fields etc. (i.e. things Eclipse doesn’t need source code for). Hence, Eclipse can’t help you here.
You weren’t asking for alternatives but on Unix there’s zipgrep and for Windows I believe Actual Search & Replace does the same.