Java Packages #3

  • Follow


Hi, I am working with a program named OtsuThresholding_16Bit, but I
can't compile even though I have the code already built. But I need
some packages that don't come already with java and I don't know how
to get them in the right place. The packages are:

import ij.*;
import ij.plugin.filter.PlugInFilter;
import ij.process.*;
import ij.gui.*;
import ij.plugin.frame.PlugInFrame;

These packages can be found in ImageJ documentation I think.
If anyone knows how I can help me put these packages to work in my
java, I'd appreciate a lot.

Thanks, Joao
0
Reply tiger.joaomarques 12/10/2008 9:52:31 PM

Jo�o Marques wrote:
> Hi, I am working with a program named OtsuThresholding_16Bit, but I
> can't compile even though I have the code already built. But I need
> some packages that don't come already with java and I don't know how
> to get them in the right place. The packages are:
> 
> import ij.*;
> import ij.plugin.filter.PlugInFilter;
> import ij.process.*;
> import ij.gui.*;
> import ij.plugin.frame.PlugInFrame;
> 
> These packages can be found in ImageJ documentation I think.
> If anyone knows how I can help me put these packages to work in my
> java, I'd appreciate a lot.
> 
> Thanks, Joao

You need to list the .jar files that those classes come in your 
classpath.  The easiest method is to put them into the same directory 
that you compile your source from and add them to the compile command line.

javac -cp .;some.jar;someother.jar MyClass.java

-- 

Knute Johnson
email s/nospam/knute2008/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
	     ------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
0
Reply nospam8071 (917) 12/10/2008 11:12:37 PM


On Dec 11, 8:52=A0am, Jo=E3o Marques <tiger.joaomarq...@gmail.com> wrote:
>..need some packages ... ImageJ ...

I suspect Knute answered a different question
to the one you are asking, but I am not sure.

So, here is my answer.
>http://www.google.com/search?q=3Dimagej+download

--
Andrew Thompson
http://pscode.org/
0
Reply andrewthommo (2516) 12/10/2008 11:25:39 PM

Andrew Thompson wrote:
> On Dec 11, 8:52 am, Jo�o Marques <tiger.joaomarq...@gmail.com> wrote:
>> ..need some packages ... ImageJ ...
> 
> I suspect Knute answered a different question
> to the one you are asking, but I am not sure.
> 
> So, here is my answer.
>> http://www.google.com/search?q=imagej+download

Very likely the original poster needs both: get the jar and
put it in classpath.

Arne
0
Reply arne6 (9617) 12/10/2008 11:28:35 PM

On 10 dez, 23:28, Arne Vajh=F8j <a...@vajhoej.dk> wrote:
> Andrew Thompson wrote:
> > On Dec 11, 8:52 am, Jo=E3o Marques <tiger.joaomarq...@gmail.com> wrote:
> >> ..need some packages ... ImageJ ...
>
> > I suspect Knute answered a different question
> > to the one you are asking, but I am not sure.
>
> > So, here is my answer.
> >>http://www.google.com/search?q=3Dimagej+download
>
> Very likely the original poster needs both: get the jar and
> put it in classpath.
>
> Arne

Well I have already downloaded de ImageJ program into my computer.
What I don't know is where those packages can be found. If you can
answer me something else, maybe it would help. When you write "import
java.util.Scanner" for example, and compile the program, the compiler
will know what package you are talking about. But where can you find
it in your computer? Is there a folder where these packages are?
0
Reply tiger.joaomarques 12/11/2008 12:39:58 AM

Jo�o Marques wrote:
> On 10 dez, 23:28, Arne Vajh�j <a...@vajhoej.dk> wrote:
>> Andrew Thompson wrote:
>>> On Dec 11, 8:52 am, Jo�o Marques <tiger.joaomarq...@gmail.com> wrote:
>>>> ..need some packages ... ImageJ ...
>>> I suspect Knute answered a different question
>>> to the one you are asking, but I am not sure.
>>> So, here is my answer.
>>>> http://www.google.com/search?q=imagej+download
>> Very likely the original poster needs both: get the jar and
>> put it in classpath.
> 
> Well I have already downloaded de ImageJ program into my computer.
> What I don't know is where those packages can be found. If you can
> answer me something else, maybe it would help. When you write "import
> java.util.Scanner" for example, and compile the program, the compiler
> will know what package you are talking about. But where can you find
> it in your computer? Is there a folder where these packages are?

In that case it is Knute's advice you need. You need to
ass the jar file to the classpath.

Like:

javac -classpath foobar.jar Something.java
java -classpath foobar.jar Something

Arne

PS: You don't need to specify anything for the java.util because those
     classes are in a jar file that java search by default.
0
Reply arne6 (9617) 12/11/2008 1:01:27 AM

Jo�o Marques wrote:

> Well I have already downloaded de ImageJ program into my computer.
> What I don't know is where those packages can be found. If you can

Well, I think you need to help us and tell us what you downloaded and 
where you put it.  We can't guess.


> answer me something else, maybe it would help. When you write "import
> java.util.Scanner" for example, and compile the program, the compiler
> will know what package you are talking about. But where can you find
> it in your computer? Is there a folder where these packages are?

No, it's the other way around.  You tell Java where to find the package, 
with the classpath.  That's why we need to know where you put the thing.

Also, what IDE are you using?


(There is a way to put any library in the default search path, but it's 
really evil and can mess up other projects.  Better to use the classpath 
by far.)


0
Reply markspace1 (537) 12/11/2008 2:00:09 AM

On 11 dez, 02:00, Mark Space <marksp...@sbcglobal.net> wrote:
> Jo=E3o Marques wrote:
> > Well I have already downloaded de ImageJ program into my computer.
> > What I don't know is where those packages can be found. If you can
>
> Well, I think you need to help us and tell us what you downloaded and
> where you put it. =A0We can't guess.
>
> > answer me something else, maybe it would help. When you write "import
> > java.util.Scanner" for example, and compile the program, the compiler
> > will know what package you are talking about. But where can you find
> > it in your computer? Is there a folder where these packages are?
>
> No, it's the other way around. =A0You tell Java where to find the package=
,
> with the classpath. =A0That's why we need to know where you put the thing=
..
>
> Also, what IDE are you using?
>
> (There is a way to put any library in the default search path, but it's
> really evil and can mess up other projects. =A0Better to use the classpat=
h
> by far.)

I have downloaded the packages that I need and I have them in my
Desktop. I tried to set the source path as to include this folder but
it doesn't seem to work. I don't really know how to use classpath. And
I use the JCreator to write my Java programs.
0
Reply tiger.joaomarques 12/11/2008 2:26:12 AM

On 11 dez, 02:00, Mark Space <marksp...@sbcglobal.net> wrote:
> Jo=E3o Marques wrote:
> > Well I have already downloaded de ImageJ program into my computer.
> > What I don't know is where those packages can be found. If you can
>
> Well, I think you need to help us and tell us what you downloaded and
> where you put it. =A0We can't guess.
>
> > answer me something else, maybe it would help. When you write "import
> > java.util.Scanner" for example, and compile the program, the compiler
> > will know what package you are talking about. But where can you find
> > it in your computer? Is there a folder where these packages are?
>
> No, it's the other way around. =A0You tell Java where to find the package=
,
> with the classpath. =A0That's why we need to know where you put the thing=
..
>
> Also, what IDE are you using?
>
> (There is a way to put any library in the default search path, but it's
> really evil and can mess up other projects. =A0Better to use the classpat=
h
> by far.)

I have downloaded the packages that I need and I have them in my
Desktop. I tried to set the source path as to include this folder but
it doesn't seem to work. I don't really know how to use classpath. And
I use the JCreator to write my Java programs.
0
Reply tiger.joaomarques 12/11/2008 2:26:24 AM

On 11 dez, 02:00, Mark Space <marksp...@sbcglobal.net> wrote:
> Jo=E3o Marques wrote:
> > Well I have already downloaded de ImageJ program into my computer.
> > What I don't know is where those packages can be found. If you can
>
> Well, I think you need to help us and tell us what you downloaded and
> where you put it. =A0We can't guess.
>
> > answer me something else, maybe it would help. When you write "import
> > java.util.Scanner" for example, and compile the program, the compiler
> > will know what package you are talking about. But where can you find
> > it in your computer? Is there a folder where these packages are?
>
> No, it's the other way around. =A0You tell Java where to find the package=
,
> with the classpath. =A0That's why we need to know where you put the thing=
..
>
> Also, what IDE are you using?
>
> (There is a way to put any library in the default search path, but it's
> really evil and can mess up other projects. =A0Better to use the classpat=
h
> by far.)

I have downloaded the packages that I need and I have them in my
Desktop. I tried to set the source path as to include this folder but
it doesn't seem to work. I don't really know how to use classpath. And
I use the JCreator to write my Java programs.
0
Reply tiger.joaomarques 12/11/2008 2:30:18 AM

On 11 dez, 02:00, Mark Space <marksp...@sbcglobal.net> wrote:
> Jo=E3o Marques wrote:
> > Well I have already downloaded de ImageJ program into my computer.
> > What I don't know is where those packages can be found. If you can
>
> Well, I think you need to help us and tell us what you downloaded and
> where you put it. =A0We can't guess.
>
> > answer me something else, maybe it would help. When you write "import
> > java.util.Scanner" for example, and compile the program, the compiler
> > will know what package you are talking about. But where can you find
> > it in your computer? Is there a folder where these packages are?
>
> No, it's the other way around. =A0You tell Java where to find the package=
,
> with the classpath. =A0That's why we need to know where you put the thing=
..
>
> Also, what IDE are you using?
>
> (There is a way to put any library in the default search path, but it's
> really evil and can mess up other projects. =A0Better to use the classpat=
h
> by far.)

I have downloaded the packages that I need and I have them in my
Desktop. I tried to set the source path as to include this folder but
it doesn't seem to work. I don't really know how to use classpath. And
I use the JCreator to write my Java programs.
0
Reply tiger.joaomarques 12/11/2008 2:32:18 AM

João Marques wrote:
> I don't really know how to use classpath.

Have you considered reading the documentation?

<http://java.sun.com/javase/6/docs/technotes/tools/solaris/classpath.html>
<http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html>

-- 
Lew
0
Reply noone7 (3512) 12/11/2008 2:36:56 AM

João Marques wrote:
> I have downloaded the packages that I need and I have them in my
> Desktop. I tried to set the source path as to include this folder but
> it doesn't seem to work. I don't really know how to use classpath. And
> I use the JCreator to write my Java programs.

No need to repeat yourself, the first three times made it through.

-- 
Lew
0
Reply noone7 (3512) 12/11/2008 2:37:53 AM

On 11 dez, 02:00, Mark Space <marksp...@sbcglobal.net> wrote:
> Jo=E3o Marques wrote:
> > Well I have already downloaded de ImageJ program into my computer.
> > What I don't know is where those packages can be found. If you can
>
> Well, I think you need to help us and tell us what you downloaded and
> where you put it. =A0We can't guess.
>
> > answer me something else, maybe it would help. When you write "import
> > java.util.Scanner" for example, and compile the program, the compiler
> > will know what package you are talking about. But where can you find
> > it in your computer? Is there a folder where these packages are?
>
> No, it's the other way around. =A0You tell Java where to find the package=
,
> with the classpath. =A0That's why we need to know where you put the thing=
..
>
> Also, what IDE are you using?
>
> (There is a way to put any library in the default search path, but it's
> really evil and can mess up other projects. =A0Better to use the classpat=
h
> by far.)

I have downloaded the packages that I need and I have them in my
Desktop. I tried to set the source path as to include this folder but
it doesn't seem to work. I don't really know how to use classpath. And
I use the JCreator to write my Java programs.
0
Reply tiger.joaomarques 12/11/2008 2:39:42 AM

João Marques wrote:
> I have downloaded the packages that I need and I have them in my
> Desktop. I tried to set the source path as to include this folder but
> it doesn't seem to work. I don't really know how to use classpath. And
> I use the JCreator to write my Java programs.

OK, stop.

-- 
Lew
0
Reply noone7 (3512) 12/11/2008 2:40:37 AM

On 11 dez, 02:37, Lew <no...@lewscanon.com> wrote:
> Jo=E3o Marques wrote:
> > I have downloaded the packages that I need and I have them in my
> > Desktop. I tried to set the source path as to include this folder but
> > it doesn't seem to work. I don't really know how to use classpath. And
> > I use the JCreator to write my Java programs.
>
> No need to repeat yourself, the first three times made it through.
>
> --
> Lew

Sorry I dont know why it happened. I just sent it once. But everytime
I refreshed another one would appear..i'll read through it then
0
Reply tiger.joaomarques 12/11/2008 2:40:42 AM

On 11 dez, 02:37, Lew <no...@lewscanon.com> wrote:
> Jo=E3o Marques wrote:
> > I have downloaded the packages that I need and I have them in my
> > Desktop. I tried to set the source path as to include this folder but
> > it doesn't seem to work. I don't really know how to use classpath. And
> > I use the JCreator to write my Java programs.
>
> No need to repeat yourself, the first three times made it through.
>
> --
> Lew

Sorry I dont know why it happened. I just sent it once. But everytime
I refreshed another one would appear..i'll read through it then
0
Reply tiger.joaomarques 12/11/2008 2:40:47 AM

João Marques wrote:
> Sorry I dont know why it happened. I just sent it once. But everytime
> I refreshed another one would appear..i'll read through it then

Don't use Google Groups.

If you must, don't use refresh.  Obviously you are refreshing the screen from 
whence you sent your reply.  Just click on one of the links provided by GG to 
navigate.  Don't use refresh from the screen from which you submitted your reply.

-- 
Lew
0
Reply noone7 (3512) 12/11/2008 2:43:04 AM

On Dec 10, 9:43=A0pm, Lew <no...@lewscanon.com> wrote:
> Jo=E3o Marques wrote:
> > Sorry I dont know why it happened. I just sent it once. But everytime
> > I refreshed another one would appear..i'll read through it then
>
> Don't use Google Groups.
>
> If you must, don't use refresh. =A0Obviously you are refreshing the scree=
n from
> whence you sent your reply. =A0Just click on one of the links provided by=
 GG to
> navigate. =A0Don't use refresh from the screen from which you submitted y=
our reply.
>
> --
> Lew

You need to learn
- What a package is and how a class can be qualified with a package
name (analogous to how a file belongs to a folder)
- What classpath is (start with above provided links)
- How to add jars to your project's classpath in your IDE or on the
command line while compiling and executing.
- What jars are already included implicitly in your project (from JRE)
If you are working on Windows, open your jar using WinZip and see if
your packages and classes are there to make sure you have correct jar
files.

0
Reply vk027201 (20) 12/11/2008 3:51:22 AM

Jo�o Marques wrote:

> I have downloaded the packages that I need and I have them in my
> Desktop. I tried to set the source path as to include this folder but
> it doesn't seem to work. I don't really know how to use classpath. And
> I use the JCreator to write my Java programs.

I don't know JCreator.  In NetBeans I can right-click on the Library 
folder of my project, pick Add Jar... and navigate to the JAR file I 
want to include in the project.  Maybe you can do the same thing in 
JCretaor.

If you're using an Ant build or similar script, we still need a path. 
The path to the Desktop varies for different user-names and versions of 
Windows and Unix.  My Desktop is at:

C:\Users\Brenden\Desktop

Where is your's?  And we'll still need the name of your JAR file.

(And yes, please loose the refresh key.)

0
Reply markspace1 (537) 12/11/2008 3:59:10 AM

To get this api you'll need to download the ij.jar.
The url to download is : http://image.bio.methods.free.fr/ijupdater2.html

0
Reply nathan.info (1) 12/11/2008 7:37:17 PM

20 Replies
31 Views

(page loaded in 0.338 seconds)

Similiar Articles:























6/22/2012 1:36:50 AM


Reply: