N
N
natomist2014-07-12 16:38:24
Java
natomist, 2014-07-12 16:38:24

How to use JMagick?

The ImageMagick manual advises using JMagick to work with this library in Java.
I
sudo apt-get install jmagick
installed the library through the command. But it turned out that to use it now you need to compile and run the program with non-trivial commands.

javac -cp /usr/share/java/jmagick6.jar Test.java
LD_LIBRARY_PATH=/usr/lib/jni/ java -cp .:/usr/share/java/jmagick6.jar Test

Question: Is this normal? Or is it possible to use some tool to avoid such ugly designs?
It confuses me that java is positioned as a cross-platform solution, but to run the program you need to use completely non-cross-platform commands. On Windows, for sure, the jmagick library will be placed in completely different directories.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
UbuRus, 2014-10-22
@natomist

Use a specialized tool for managing dependencies (jmagick) and building a project: gradle !
To get started: www.gradle.org/docs/current/userguide/tutorial_jav...
JMagick in mvnrepository.com/artifact/jmagick/jmagick/6.6.9
This is how JMagick should be added to gradle dependencies
Documentation: www.gradle.org /documentation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question