harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry M. Kononov" <dmitry.m.kono...@gmail.com>
Subject [classlib][tools] Should launcher pass the required jars to JVM's class path automatically?
Date Thu, 27 Jul 2006 11:31:46 GMT

I've developed a tool (it's a replacement of javah for Harmony) that
depends on BCEL. I've found a way how it can be integrated into the
current build system, so it compiles successfully. The compiled
classes are placed into the deploy\jdk\lib\tools.jar. bcel-5.0.jar is
copied into the deploy\jdk\lib directory. So the build works and
results look as expected.

I do the following to run the tool (whose name is ijh at the moment).

1.copy deploy\jdk\jre\bin\java.exe to deploy\jdk\jre\bin\ijh.exe
2.copy deploy\jdk\lib\tools.jar into deploy\jdk\jre\bin\
3.copy deploy\jdk\lib\bcel-5.0.jar into deploy\jdk\jre\bin\
4.run ijh.exe

And see the usage info of the tool. This means that the launcher finds
appropriate classes of tools.jar successfully. Cool.

But if I run ijh.exe with a class as an argument (bcel's classes are
required in this case) as follows:

ijh.exe Test01

JVM can't find bcel's classes. So it looks like I have to provide the
correct class path which includes bcel-5.0.jar. Ok.
To do so I run the tool in this way:

ijh.exe -J-cp bcel-5.0.jar;. Test01

This works. But the problem is that it's a bad approach to pass all
the required jars in a command line.
It would be better if the launcher adds bcel-5.0.jar to the class path
for the ijh tool in some automatic manner.

Could you please explain me what is the correct way to solve this problem?

Dmitry M. Kononov
Intel Managed Runtime Division

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message