How to add 3rd party JAR's to compile time cla

2019-02-19 14:37发布

What do I need to do to successfully the import ij package? I get an error:

ITCN_.java:1: package ij does not exist

The imports are:

import ij.*; 
import ij.io.*;
import ij.gui.*; 
import ij.process.*; 
import ij.measure.*; 
import ij.plugin.*; 
import ij.plugin.frame.*; 
import ij.plugin.filter.PlugInFilter;

import java.io.*; 
import java.awt.*; 
import java.awt.event.*;
import java.util.*; 
import java.lang.*; 
import java.text.*;

标签: java import
2条回答
爷、活的狠高调
2楼-- · 2019-02-19 14:49

I also used Jgrasp back in the day.

I highly recommend moving to eclipse although jGrasp is very simple and works.

To Add to the Build Path you go to Settings -> PATH/CLASSPATH -> Workspace

Click on the "Path" tab, and then the "CLASSPATHS" subtab.

Then Click "New" and where it says Path or Jar file, enter in the path to the ij jar file. Do this for each file if there are more than one.

And then click "apply" and you should be able to use import ij.* and the subsequent functions

查看更多
干净又极端
3楼-- · 2019-02-19 14:59

It's the ImageJ API. The API docs are available here. You can download it here. Once downloaded, just add the JAR(s) to the compiletime and runtime classpath.

查看更多
登录 后发表回答