Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java Packages

Reply
Thread Tools

Java Packages

 
 
Joćo Marques
Guest
Posts: n/a
 
      12-10-2008
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
 
Reply With Quote
 
 
 
 
Knute Johnson
Guest
Posts: n/a
 
      12-10-2008
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
 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      12-10-2008
On Dec 11, 8:52*am, Joćo Marques <(E-Mail Removed)> 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


--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
Arne Vajhųj
Guest
Posts: n/a
 
      12-10-2008
Andrew Thompson wrote:
> On Dec 11, 8:52 am, Joćo Marques <(E-Mail Removed)> 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
 
Reply With Quote
 
Joćo Marques
Guest
Posts: n/a
 
      12-11-2008
On 10 dez, 23:28, Arne Vajhųj <(E-Mail Removed)> wrote:
> Andrew Thompson wrote:
> > On Dec 11, 8:52 am, Joćo Marques <(E-Mail Removed)> 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


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?
 
Reply With Quote
 
Arne Vajhųj
Guest
Posts: n/a
 
      12-11-2008
Joćo Marques wrote:
> On 10 dez, 23:28, Arne Vajhųj <(E-Mail Removed)> wrote:
>> Andrew Thompson wrote:
>>> On Dec 11, 8:52 am, Joćo Marques <(E-Mail Removed)> 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.
 
Reply With Quote
 
Mark Space
Guest
Posts: n/a
 
      12-11-2008
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.)


 
Reply With Quote
 
Joćo Marques
Guest
Posts: n/a
 
      12-11-2008
On 11 dez, 02:00, Mark Space <(E-Mail Removed)> wrote:
> 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.)


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.
 
Reply With Quote
 
Joćo Marques
Guest
Posts: n/a
 
      12-11-2008
On 11 dez, 02:00, Mark Space <(E-Mail Removed)> wrote:
> 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.)


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.
 
Reply With Quote
 
Joćo Marques
Guest
Posts: n/a
 
      12-11-2008
On 11 dez, 02:00, Mark Space <(E-Mail Removed)> wrote:
> 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.)


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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Packages : A loomingproblem? packages might no longer work? (well not on your platform or python version anyway) David Lyon Python 19 04-23-2009 11:10 PM
Advice on converting hashed packages to pseudo-hashed packages Ian Perl Misc 3 02-12-2005 12:17 AM
Do the javax.imageio packages replace packages in com.sun.image? Paul Smith Java 0 11-18-2003 02:58 PM
Java Math packages Silvere Martin-Michiellot Java 3 10-06-2003 10:09 PM



Advertisments