Link to home
Start Free TrialLog in
Avatar of Los Angeles1
Los Angeles1

asked on

Java, how to search if a class exists with a Jar

What is the comand to determine if a class exists within a jar

I tried the following

java -jar TEST.jar -i . button
Ignoring unknown flag: -i
Ignoring unknown flag: .
Ignoring unknown flag: button

java.lang.NullPointerException

Open in new window


But obviously it did not work

Could someone please post an example of how to do this for

1> Th ecurrent directory

2> any subdirectory

Thanks
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

http://technojeeves.com/joomla/index.php/free/45-jarsearch
 i've already given you. If you want to use the command line (assuming Windows)

jar tf x.jar | find "something"

Open in new window


Of course, that will only work for one jar at a time
Avatar of Los Angeles1
Los Angeles1

ASKER

I dont have an excutable named jar

Do you mean java

I can not get tf or -tf to work

Can you help on this
SOLUTION
Avatar of dpearson
dpearson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
:)