[brailleblaster] Re: jar Files

  • From: Michael Whapples <mwhapples@xxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Sun, 07 Nov 2010 15:57:30 +0000

If doing the creation by hand then you use the jar command in the JDK, but tools like maven and ant have facilities to allow you to build a jar file as part of the build process.


How to include libraries in a jar file? You need the compiled library already created (either created as an earlier step of the build process or manually produced earlier) and you just copy the library file (DLL, shared object file, etc) into the jar like any other resource file. Again SWT and JNA's build systems may provide useful examples.

May be others don't include liblouis and liblouisxml in jar files because they may not want the effort of writing the code to manage extracting the library when required. As a question, do we need liblouis and liblouisutdml included in jar files? I had imagined we were going to go down the route of having a directory structure which is packaged into a zip file, requiring the user to download the zip file, unzip it somewhere and run it from that location, rather than trying to bundle everything into a single jar.

Why had I gone with the zip file idea? one advantage is that users may wish to modify things (eg. as I said may be add another driver not included in BrailleBlaster). Thinking further that would be possible with a single jar file, you just have an external settings/plugin directory brailleblaster uses.

Michael Whapples
On 07/11/10 06:48, John J. Boyer wrote:
How does one go about creating a jar file? In particular, how would one
create a jar rfile that also contains C or C++ libraries? For example,
how woulod I include liblouis and liblouisutdml in a jar file with the
bindings?

The ODT2braille plugin for Open Office has liblouis and liblouisxml dlls
in a bin subdirectory. How do they load these libraries?

We also have the C library itex2MMl and the C++ library hunspell. It
would be nice if we could encapsulate them in a jar file with their
bindings.

Thanks,
John



Other related posts: