Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > problem compiling project, classpath in xml ".classpath" "<classpathentry...>"

Reply
Thread Tools

problem compiling project, classpath in xml ".classpath" "<classpathentry...>"

 
 
jameshanley39@yahoo.co.uk
Guest
Posts: n/a
 
      03-02-2007
problem compiling project, classpath in xml ".classpath"
"<classpathentry...>"


i'm trying to compile a project, it has about 70 jar files. Though it
may not use all 70.

I want to compile it from the command line. Though I think it was
intended to be compiled from some IDE.

Various parent directories have ".classpath" files

with contents in xml, such as

<classpath>.........
<classpathentry .................>

There are a few of these files one in each of a number of parent
directories.

I'd like to know what these xml files are written for. It's a layer
over java so it must produce a classpath which it passes to the JVM.

One option I have is to make a jar file that references all 70 jar
files in its manifest under Class-Path. Then when compiling the
program I just reference that one jar file. I've never done anything
like it but It's something i will try. But really i'd like to only use
the jar files that are used. And there may be clashes if I load all
the jars as I would there. Since most of the jars contain packages
with largely the same paths.

I'd like to know what would be parsing these .classpath files. It
looks like it may be some standard thing. I'd like to know if I can
and I should be able to, turn them into a classpath. Figure out all
the jar files being used. I suppose I could somehow write something
to parse them. But I think there must be a program that reads those
files otherwise how would it run the JVM. I'm hoping it's a standard
program/tool that does it.

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      03-02-2007
On Mar 2, 1:01 pm, "(E-Mail Removed)"
<(E-Mail Removed)> wrote:
> problem compiling project, classpath in xml ".classpath"
> "<classpathentry...>"
>
> i'm trying to compile a project, it has about 70 jar files. Though it
> may not use all 70.


(big) Uh-huh..

> I'd like to know what would be parsing these .classpath files.


...oh, what? That was the question?

>From reading (OK - scanning) the text

above, the best advice I can give you
is to learn how to use ant, since it
will be much easier to sort which jars
are required from within the config.
file of a tool inteded for building
complex projects, than by messing about
with parameters on the command line.

As an aside, I guess that once you begin
to understand the ant build tool better,
all thoughts of doing builds from the
command line will vanish.

Building projects is much easier to do
using ant, whether invoking it from an
IDE, or the command line, as I commonly
do.

HTH

Andrew T.

 
Reply With Quote
 
 
 
 
jameshanley39@yahoo.co.uk
Guest
Posts: n/a
 
      03-02-2007
On 2 Mar, 06:15, "Andrew Thompson" <(E-Mail Removed)> wrote:
> On Mar 2, 1:01 pm, "(E-Mail Removed)"
>
> <(E-Mail Removed)> wrote:
> > problem compiling project, classpath in xml ".classpath"
> > "<classpathentry...>"

>
> > i'm trying to compile a project, it has about 70 jar files. Though it
> > may not use all 70.

>
> (big) Uh-huh..
>
> > I'd like to know what would be parsing these .classpath files.

>
> ..oh, what? That was the question?
>
> >From reading (OK - scanning) the text

>
> above, the best advice I can give you
> is to learn how to use ant, since it
> will be much easier to sort which jars
> are required from within the config.
> file of a tool inteded for building
> complex projects, than by messing about
> with parameters on the command line.
>
> As an aside, I guess that once you begin
> to understand the ant build tool better,
> all thoughts of doing builds from the
> command line will vanish.
>
> Building projects is much easier to do
> using ant, whether invoking it from an
> IDE, or the command line, as I commonly
> do.
>
> HTH
>
> Andrew T.



I don't know which jar files it uses. Does ant figure that one out?
Even if it could, it'd still be stumped were there to be 2 jars that
have the same class at the same path.

Ideally I need something to parse these xml files. I think they are
related to Eclipse (edit..find...classpathentry) shows an examples of
whati i'm dealing with
http://jmri.sourceforge.net/doc/Technical/Eclipse.html

But I can do it without it a parser of that sort of thing. I'll look
into ant. I'll read those .classpath files manually, it won't take SO
long.
If it did take that long, I could write my own parser for it, it's
only xml, it's built to be parsed.

it's ok

but if anybody knows of this classpathentry format, if there is
already something to parse it, that'd be good.

 
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
Cross-compiling error when compiling 2.6.1... Garrett Cooper Python 0 02-24-2009 08:55 PM
.classpath file instead of the CLASSPATH Environment variable. dontspammenow@yahoo.com Java 2 03-02-2008 08:19 AM
while using javac -classpath some.jar some.java (Where does classpath get stored?) Gabe Java 3 08-27-2004 07:02 PM
Compiling and classpath Philip Java 1 04-22-2004 02:02 AM
CLASSPATH, -cp and -classpath misunderstanding? Flip Java 3 02-09-2004 10:09 PM



Advertisments