[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 答复: how to deal with existing java file or class file?
Hi Helen,
> I tried to set soot classpath using command line option. But I tried to in the following form:
> "java -soot-class-path /home/hy/testing"
> //error msg: Unrecognized option: -soot-class-path
> Could not create the Java virtual machine.
-soot-classpath is a soot commaind line option, not for java virtual
machine.
> " java soot.Main -soot-class-path /home/hy/testing"
> //error msg: compilation failed: No main class specified!
You only supplied soot the class path where to find your class files,
you should also specify the name of class to be sootified. For example,
under the directory /home/hy/testing, there is a HelloWorld.class, and
if you want to inspect this class, you should do
java soot.Main -soot-classpath /home/hy/testing HelloWorld
Soot may complain that it couldn't find java.lang.Object, in that case,
you need to add the rt.jar to -soot-classpath too. e.g.,
java soot.Main -soot-classpath $JDKDIR/jre/lib/rt.jar:/home/hy/testing
HelloWorld
(NOTE, to replace $JDKDIR by the real JDK path on your machine).
BTW: I cc'ed this reply to soot-list, your question will receive more
response there.
Cheers,
Feng