Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > placement of other jars not in original in JDK download

Reply
Thread Tools

placement of other jars not in original in JDK download

 
 
bH
Guest
Posts: n/a
 
      08-21-2012
Hi All,
If I download poi-3.8 binary and I want to access
some of the jar files that are in the download,
as in this set of opening lines of a program that
uses some of it:

import org.apache.poi.poifs.filesystem.*;
import org.apache.poi.hwpf.*;
import org.apache.poi.hwpf.extractor.*;
import java.io.*;

Where do I place the poi-3.8
items(jars) that are in apache poi download?
my compiler is:

JDK 6.0_25 from C:\Program Files\Java\jdk1.6.0_25\lib\tools.jar

TIA,
bH





 
Reply With Quote
 
 
 
 
Jeff Higgins
Guest
Posts: n/a
 
      08-21-2012
On 08/21/2012 03:31 PM, bH wrote:
> Hi All,
> If I download poi-3.8 binary and I want to access
> some of the jar files that are in the download,
> as in this set of opening lines of a program that
> uses some of it:
>
> import org.apache.poi.poifs.filesystem.*;
> import org.apache.poi.hwpf.*;
> import org.apache.poi.hwpf.extractor.*;
> import java.io.*;
>
> Where do I place the poi-3.8
> items(jars) that are in apache poi download?


On the classpath.
<http://docs.oracle.com/javase/tutorial/essential/environment/paths.html>

> my compiler is:
>
> JDK 6.0_25 from C:\Program Files\Java\jdk1.6.0_25\lib\tools.jar


 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      08-21-2012
Jeff Higgins wrote:
> bH wrote:
> > If I download poi-3.8 binary and I want to access
> > some of the jar files that are in the download,
> > as in this set of opening lines of a program that
> > uses some of it:

>
> > import org.apache.poi.poifs.filesystem.*;
> > import org.apache.poi.hwpf.*;
> > import org.apache.poi.hwpf.extractor.*;
> > import java.io.*;

>
> > Where do I place the poi-3.8
> > items(jars) that are in apache poi download?

>
> On the classpath.
> <http://docs.oracle.com/javase/tutorial/essential/environment/paths.html>


Except don't use the CLASSPATH environment variable.

Use the "-cp" or equivalent "-classpath" option to the Java tools.
<http://docs.oracle.com/javase/7/docs/index.html>
<http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/java.html#options>

<http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/classpath.html>
"path option is preferred because you can set it individually for each application
without affecting other applications and without other applications modifying its value."

In short, OP, read the documentation.

--
Lew
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      08-21-2012
On Tue, 21 Aug 2012 12:31:40 -0700 (PDT), bH <(E-Mail Removed)>
wrote, quoted or indirectly quoted someone who said :

>JDK 6.0_25 from C:\Program Files\Java\jdk1.6.0_25\lib\tools.jar


put them in the ext dir
put them on the SET classpath
put them on the commandline -classpath
use JNLP
--
Roedy Green Canadian Mind Products http://mindprod.com
A new scientific truth does not triumph by convincing its opponents and making them see the light,
but rather because its opponents eventually die, and a new generation grows up that is familiar with it.
~ Max Planck 1858-04-23 1947-10-04


 
Reply With Quote
 
Jeff Higgins
Guest
Posts: n/a
 
      08-21-2012
On 08/21/2012 04:50 PM, Lew wrote:
> Jeff Higgins wrote:
>> bH wrote:
>>> If I download poi-3.8 binary and I want to access
>>> some of the jar files that are in the download,
>>> as in this set of opening lines of a program that
>>> uses some of it:

>>
>>> import org.apache.poi.poifs.filesystem.*;
>>> import org.apache.poi.hwpf.*;
>>> import org.apache.poi.hwpf.extractor.*;
>>> import java.io.*;

>>
>>> Where do I place the poi-3.8
>>> items(jars) that are in apache poi download?

>>
>> On the classpath.
>> <http://docs.oracle.com/javase/tutorial/essential/environment/paths.html>

>
> Except don't use the CLASSPATH environment variable.
>
> Use the "-cp" or equivalent "-classpath" option to the Java tools.
> <http://docs.oracle.com/javase/7/docs/index.html>
> <http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/java.html#options>
>
> <http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/classpath.html>
> "path option is preferred because you can set it individually for each application
> without affecting other applications and without other applications modifying its value."
>
> In short, OP, read the documentation.
>

Thank you for reiterating the advice given in the tutorial link above.

 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      08-21-2012
On 8/21/2012 5:11 PM, Roedy Green wrote:
> On Tue, 21 Aug 2012 12:31:40 -0700 (PDT), bH <(E-Mail Removed)>
> wrote, quoted or indirectly quoted someone who said :
>
>> JDK 6.0_25 from C:\Program Files\Java\jdk1.6.0_25\lib\tools.jar

>
> put them in the ext dir
> put them on the SET classpath
> put them on the commandline -classpath
> use JNLP


2 bad + 2 good advices

Arne


 
Reply With Quote
 
John B. Matthews
Guest
Posts: n/a
 
      08-22-2012
In article <50341328$0$291$(E-Mail Removed)>,
Arne Vajh├Şj <(E-Mail Removed)> wrote:

> On 8/21/2012 5:11 PM, Roedy Green wrote:
> > On Tue, 21 Aug 2012 12:31:40 -0700 (PDT), bH <(E-Mail Removed)>
> > wrote, quoted or indirectly quoted someone who said :
> >
> >> JDK 6.0_25 from C:\Program Files\Java\jdk1.6.0_25\lib\tools.jar

> >
> > put them in the ext dir
> > put them on the SET classpath
> > put them on the commandline -classpath
> > use JNLP

>
> 2 bad + 2 good advices


bH: You may not notice problems from the first two until you've parked a
few JARs there, forgotten about them, and then added newer versions
elsewhere.

If you're using NetBeans, add the JARs in Tools > Libraries, where they
can then be accessed as a group by projects that need them. Eclipse has
a comparable feature.

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      08-22-2012
Jeff Higgins wrote:
> Lew wrote:
>> Jeff Higgins wrote:
>>> bH wrote:
>>>> If I download poi-3.8 binary and I want to access
>>>> some of the jar files that are in the download,
>>>> as in this set of opening lines of a program that
>>>> uses some of it:
>>>
>>>> import org.apache.poi.poifs.filesystem.*;
>>>> import org.apache.poi.hwpf.*;
>>>> import org.apache.poi.hwpf.extractor.*;
>>>> import java.io.*;
>>>
>>>> Where do I place the poi-3.8
>>>> items(jars) that are in apache poi download?
>>>
>>> On the classpath.
>>> <http://docs.oracle.com/javase/tutorial/essential/environment/paths.html>

>>
>> Except don't use the CLASSPATH environment variable.
>>
>> Use the "-cp" or equivalent "-classpath" option to the Java tools.
>> <http://docs.oracle.com/javase/7/docs/index.html>
>> <http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/java.html#options>
>>
>>
>> <http://docs.oracle.com/javase/6/docs/technotes/tools/solaris/classpath.html>
>> "path option is preferred because you can set it individually for each
>> application
>> without affecting other applications and without other applications
>> modifying its value."
>>
>> In short, OP, read the documentation.
>>

> Thank you for reiterating the advice given in the tutorial link above.


You are very welcome.

--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedi.../c/cf/Friz.jpg
 
Reply With Quote
 
Bob H
Guest
Posts: n/a
 
      08-22-2012
Hi All,
Clarifying what I ultimately wanted:
I am trying to read a "xxx.doc" file downloaded
to a Windows Vista 32-bit operating system.
John M wrote :
"If you're using NetBeans, add the JARs in Tools > Libraries, where they
can then be accessed as a group by projects that need them. Eclipse has
a comparable feature."

I am using neither NetBeans nor Eclipse.

The posts here so far indicate that I should place
latest poi-3.8 binary jars into the folder where
where the tools.jar is located?

If there is no more help forthcoming then I abandon
this project.

Thanks to all for your responses.

bH
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      08-22-2012
Bob H wrote:
> Clarifying what I ultimately wanted:
> I am trying to read a "xxx.doc" file downloaded
> to a Windows Vista 32-bit operating system.
>
> John M wrote :
>> "If you're using NetBeans, add the JARs in Tools > Libraries, where they
>> can then be accessed as a group by projects that need them. Eclipse has
>> a comparable feature."

>
> I am using neither NetBeans nor Eclipse.
>
> The posts here so far indicate that I should place
> latest poi-3.8 binary jars into the folder where
> where the tools.jar is located?


NO!

No, no, no.

Put it anywhere you want and include the JAR in the classpath.

> If there is no more help forthcoming then I abandon
> this project.


What was wrong with the complete and accurate help you already got?

Did you read the indicated links about classpath?

Why not?

> Thanks to all for your responses.


You thank us best by using the information. Jeff Higgins, for example,
gave you a very solid start.

--
Lew

 
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
Add *.jars to *.jars possible/recommendend? Eclipse setup for this? Ulf Meinhardt Java 2 02-03-2010 04:11 PM
Loading image from jars from other jars etc JavaEnquirer Java 2 02-22-2006 03:42 PM
JARs containing JARs alan@engrm.com Java 5 05-19-2005 04:55 PM
exec jars w/dependent jars Ike Java 6 09-24-2004 06:03 PM
Help with converting IDS from JDK 1.1 to JDK 1.4 Babar Java 1 05-20-2004 09:11 PM



Advertisments