1
0

faq.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V2.0//EN"
  3. "http://forrest.apache.org/dtd/faq-v20.dtd">
  4. <!--
  5. Copyright (c) 2010-2010 by Bernhard Bablok (bablokb@users.sourceforge.net)
  6. $Revision: 1.2 $
  7. $Author: bablokb $
  8. -->
  9. <faqs>
  10. <title>im4java Frequently Asked Questions</title>
  11. <faqsection id="general">
  12. <title>General Questions</title>
  13. <faq id="jni">
  14. <question>
  15. What exactly do you mean with <em>JNI-hazard</em>?
  16. </question>
  17. <answer>
  18. <p>
  19. Running native code using JNI from within java always
  20. imposes additional risks. The JVM is no longer sandboxed, so
  21. there
  22. might be some security issues. In addition, there could be
  23. errors like memory leaks or memory corruption within the
  24. JNI-layer (JMagick) or within the native code (ImageMagick).
  25. </p>
  26. <p>
  27. This is especially dangerous for long running processes
  28. (typically web-application-servers). Memory corruption or a
  29. segmentation fault (maybe triggered by a intentionally
  30. manipulated image) might bring down the whole server.
  31. </p>
  32. <p>
  33. On the other side, in reality the situation is not as bad as
  34. it sounds above. JMagick is well tested, and for standard
  35. use-cases it prooves to be very stable.
  36. </p>
  37. <p>
  38. Some additional information is available on the
  39. JMagick-users mailing list where <a href="ext:jumljni">this
  40. topic</a> has been discussed to some detail.
  41. </p>
  42. </answer>
  43. </faq>
  44. <faq id="winconvert">
  45. <question>
  46. The library does not use ImageMagicks <code>convert</code>
  47. command, but the one supplied by Microsoft. What can I do?
  48. </question>
  49. <answer>
  50. <p>
  51. Read the Developer's Guide, section <a
  52. href="dev-guide.html#environment">Setting up the
  53. Environment</a>.
  54. </p>
  55. </answer>
  56. </faq>
  57. <faq id="cmdoption">
  58. <question>
  59. The program xxx supports option <code>-foo</code>, but im4java
  60. does not. Why? And what can I do about it?
  61. </question>
  62. <answer>
  63. <p>
  64. Keeping up with actively devolped tools is not easy, im4java
  65. will always lag behind in the support of new commandline
  66. options. But adding support for a new option is
  67. straightforward:
  68. </p>
  69. <ol>
  70. <li>Download the source-distribution of im4java.</li>
  71. <li>Edit the file <code>input/XXXinterface.txt</code> and
  72. add your new option. The syntax of the file should be
  73. clear.
  74. </li>
  75. <li>Run <code>make src jar</code>. That's it!</li>
  76. <li>Post the diff of <code>input/XXXinterface.txt</code>
  77. on the jmagick-users mailing-list. I will add it to the
  78. next version of im4java.
  79. </li>
  80. </ol>
  81. </answer>
  82. </faq>
  83. <faq id="exception">
  84. <question>
  85. Running my code just throws a
  86. <code>CommandException</code>. What can I do?
  87. </question>
  88. <answer>
  89. <p>
  90. In case there is a CommandException, you should always print
  91. the associated error-text:
  92. </p>
  93. <source>
  94. try {
  95. ...
  96.     } catch (CommandException ce) {
  97.       ce.printStackTrace();
  98.       ArrayList&lt;String&gt; cmdError = ce.getErrorText();
  99.       for (String line:cmdError) {
  100.         System.err.println(line);
  101.       }
  102.     } catch (Exception e) {
  103.       e.printStackTrace();
  104.   }
  105. </source>
  106. <p>The error-text ist the stderr of the used
  107. command. Hopefully it tells you why it failed.
  108. </p>
  109. </answer>
  110. </faq>
  111. <!-- More faqs or parts here -->
  112. </faqsection>
  113. <faqsection id="implementation">
  114. <title>Implementation related</title>
  115. <faq id="meta">
  116. <question>
  117. To be asked.
  118. </question>
  119. <answer>
  120. <p>To be answered.
  121. </p>
  122. </answer>
  123. </faq>
  124. <!-- More faqs or parts here -->
  125. </faqsection>
  126. </faqs>