[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Trying to compile a package that depends on bouncycastle



Hey Adam,

Like javascript, there are a few package managers for Java. Maven is
one of the dominant ones. It acts like npm and grunt/gulp for
javascript. It should handle setting up all the command line options
for compiling, but if you are going to run something manually, you'll
still need those magic options. It shouldn't be too difficult to find
a tutorial on how to use Maven.

For tiny projects, it's sometimes easier just to compile things
manually in which case you should follow Emmanuel's comment. You'll
want to use the same -cp arguments for both the javac and java
commands. The -cp command just lists the dependencies which is usually
needed if you use an import not under of the java.* namespace.

Cheers,
Andrew

On Sun, Jul 13, 2014 at 2:07 PM, Adam Spragg <adam@spra.gg> wrote:
> Hi Emmanuel,
>
> On Sunday 13 Jul 2014 19:10:30 Emmanuel Bourg wrote:
>> Installing the package is not enough, you have to specify the libraries
>> used when running javac. For example:
>>
>>   javac -cp /usr/share/java/bcprov.jar:/usr/share/java/bcpkix.jar
>> DumpPublicKey.java
>
> Ah, right. That did it! Thanks.
>
> Sorry, for some reason I thought that "import" in java worked as the
> equivalent of a "#include <header>" and a "-llibrary", and that dependencies
> were findable in the filesystem by their import name, so it would all "just
> work".
>
> Don't know where I got that from.
>
> Anyway, so that I don't have to ask the list next time, could someone point me
> to a basic tutorial for this, so I can figure out for myself the mapping from,
> e.g. "org.bouncycastle.jce.provider.BouncyCastleProvider" to
> "/usr/share/java/bcprov.jar:/usr/share/java/bcpkix.jar"
>
> (Is there a java equivalent of pkg-config that will do it for me?)
>
>
> Thanks again,
>
> Adam
>
>
> --
> To UNSUBSCRIBE, email to debian-java-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 201407132207.38490.adam@spra.gg">https://lists.debian.org/[🔎] 201407132207.38490.adam@spra.gg
>


Reply to: