java -cp a.jar -jar b.jar => Works on Windows, not on Debian

C

cyberco

OK, I feel like a complete newbie posting this, but this has baffeled
me completely. I tried to execute the following:

java -cp a.jar -jar b.jar

Of course b.jar requires a.jar to run and both jars are in the same
directory. It worked on windows but not on Debian. I've checked a
million times that a.jar could be found by Debian (tried absolute
paths, relative paths, exported classpath env. variables, path env.
variables etc etc).

What could explain the difference between Windows and Debian? Are jars
treated differently on both platforms? Is it something in the manifest?
 
R

Roedy Green

What could explain the difference between Windows and Debian? Are jars
treated differently on both platforms? Is it something in the manifest?

what is the current directory in either case relative to where the
jars live?
 
P

pwt

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I don't know why it works on one OS but not another, but you may as
well do this anyway.

java -cp a.jar;b.jar SomeClassNameInsideOneOfTheJars

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.2 - not licensed for commercial use: www.pgp.com

iQIVAwUBQ/FPfEJUpdbmcyFBAQJcdxAAiSf78YecfRJ1AMHSKPMyLlgw9NtSICWn
kCMP8AWczfQJUVt7ckk5+ozKe0JwyI86khuxBvN6NMhUaNblyDzmPMbJrrG3laqT
0Jvpyi2e6nOIXST2lbl8M3ieNCDfb0D+tP2w+8MmzkYvSZYrP/nI7XZJIwq9/ubu
qh3ZH1onWG71XIZjMY8b6Zy3dVwiv610gFVXerhSI+A2Z6dzR3opZclB6IS9m8fH
J3hQvQM23+wcMcflcsxwqmtw8TehsC393jPTv79nfOVESuGxWcauZDWJdbPs0/82
OMTGNnOA93YyiYJ5U+koAzzKcGa1W00mNH3YMkyw8JevU0UT7vRtHjlJ+OeEm0ry
3fpA41QKExhi0Zls94SA7g6sa1gC3njRvZpOx1fvSynxn/GrPevBONnp5ahaJzfi
oViKhETbLutjE/yZ+n6pKtU5YJOgFWTfNtgv8FPJ0+u/Vb7Llr0K4hc//gj2XI+6
8Q92xttp8drHgXTVB84NrIk6lWfcZR83EcZ8xxr9jeJqRS3Ltv0DymheKTR1ycXh
4ew0yR67bjR/GKdHXhQ2GD7bd1ltg0iQIKsy63RSP7CTmO7PfIKWdPcGRo+7A9FM
60mKC4h7eLouvbwQ3YaprCXZVAUjgDOOGZX+S+KhN+qKho0AUth+7k0aljuYow8r
fIYUBaAvLHw=
=n8TD
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top