Login  Register

How to use jar file in ImageJ plugin?

Posted by panovr on Jan 19, 2006; 10:37pm
URL: http://imagej.273.s1.nabble.com/How-to-use-jar-file-in-ImageJ-plugin-tp3703985.html

Hi,
  I want to pack some class files in a jar file, and use this jar file in ImageJ plugin.
  Suppose that my source package java files are:
  ===============================================
  1. MyClassA.java
  package mypackage
  [import statements]
  public MyClassA extends Object {
      ...
  }
  2. MyClassB.java
  package mypackage
  [import statements]
  public MyClassB extends Object {
      ...
  }
  ================================================
  Step 1: put MyClassA.java and MyClassB.java in D:\mypackage directory
  Step 2: go into D:\ directory, and type "javac MyClassA.java" and "javac MyClassB.java" in Dos command
  Step 3: how to use jar command to pack MyClassA.class and MyClassB.class into a jar file? Do I need to supply a manifest file?
  Step 4: where should I put this jar file in order to ImageJ can find  and I can use this jar file when develop ImageJ plugin?

  Thanks!