[Soot-list] Problem with -outjar and file separator
Eric Bodden
eric at bodden.de
Sun May 15 18:38:32 EDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
I am using abc on windows, which leads to the fact, that the sources
are read in by polyglot with '\' as separator char. After being
processed by abc, I use the "outjar" option to write the result into
a JAR. This outjar is actually a Soot functionality as I saw. Thus I
am posting here. Soot produces a JAR which also use the
system-dependent separator char for the jar-internal path:
SourceLocator.getFileNameFor(SootClass c, int rep) states:
if (rep != Options.output_format_dava) {
if(rep == Options.output_format_class) {
b.append(c.getName().replace('.',
File.separatorChar));
} else {
b.append(c.getName());
}
b.append(getExtensionFor(rep));
return b.toString();
}
The problem is now that when trying to run the woven code from the
JAR, Java cannot find all classes: Apparently the class loader
expects the JAr-internal separator to always be '/' independent of
the OS.
For the attached example jar I receive the following:
F:\Desktop\LOR-Test>java -cp out.jar;"f:\Coding\Eclipse
Workspace\abc\lib\abc-runtime.jar";"F:\Coding\Eclipse
Workspace\ltl2aa\bin" Test
Exception in thread "Thread-0" java.lang.NoClassDefFoundError:
rwth/i2/ltlrv/formula/Formula$1
at Worker.run(Worker.java:32)
at java.lang.Thread.run(Unknown Source)
Is this a bug or am I doing something wrong?
Cheers,
Eric
- --
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3
iQA/AwUBQofPZ8wiFCm7RlWCEQLffQCdFRvleJllJvVOxVMqiNunIgYFqLgAoKt3
TmJMtjIx18FT3Sc3oI9w6o6m
=W0o0
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: out.jar
Type: application/octet-stream
Size: 5661 bytes
Desc: not available
Url : http://www.sable.mcgill.ca/pipermail/soot-list/attachments/20050516/9c2ec786/out.obj
More information about the Soot-list
mailing list