You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Dennis Gray <dm...@fareast.com.au> on 2000/06/22 12:05:57 UTC

Compiling with jdk1.2.2 (Linux)

Sorry, I am a near complete novice to the Java world but have found
myself needing to start learning something about servlets and JSP for a
project I am on at work. I thought I would install Tomcat on my home
Linux system so I could shortcut the process but have run into a
problem.

At work, I am running Sun OS with a JDK1.1.??. When ran the bootstrap.sh
and build.sh for ant, I had no problems save for a few warnings about
some deprecated things. I just ignored them and after building Tomcat, I
have a running Tomcat server.

I then attempted to do this at home running the jdk1.2.2 for Linux that
I got from Sun. I am attaching the output from what I got when I ran
bootstrap.sh. If anyone can nudge me in the right direction as to what
might be wrong, please let me know.

Regards,

Dennis


Re: Compiling with jdk1.2.2 (Linux)

Posted by Dennis Gray <dm...@fareast.com.au>.
Peter Donald wrote:

> oh and another thing it prolly would have been sufficient to only send a
> few errors as they were all basically the same :P
>

I'll look into your suggestions but apologies for including the whole file.

Dennis


Re: Compiling with jdk1.2.2 (Linux)

Posted by Dennis Gray <dm...@fareast.com.au>.
Hi Peter,

> >Where is this supposed to be? I don't find it anywhere on my system.
>
> okay you will have to copy xerces.jar from your solaris system or
> alternatively get xerces from cvs (goto xml.apache.org to get details).
>

I'll go get it. I guess others who compiled successfully on Linux already had it.

> specifically look at these lines in bootstrap. JAVA_HOME should be set to
> your java directory and you currently have it set to /usr/local/java.

/usr/local/java is a symbolic link to /usr/local/jdk1.2.2

> Make sure you are not using the kaffe virtual machine/compiler which comes
> with default instal on some distributions (notably the red hat distros). In
> which case try to uninstall it or put /usr/local/java/bin at the start of
> PATH environment variable (by export PATH=/usr/local/java/bin:$PATH if in a
> bourne style shell) .
>

Ahh! Herein lies the problem! I found an extra javac in /usr/bin or some such
directory so got rid of it and progressed further. Some other problem came up but
I will  tackle that tomorrow.

Many thanks!

Dennis


Re: Compiling with jdk1.2.2 (Linux)

Posted by Peter Donald <do...@mad.scientist.com>.
At 08:50  22/6/00 +1000, you wrote:
>This is exactly the same source that compiled okay on the Solaris box.
Nothing
>changed except the JDK version.

okay ... so write permissions is available on all files then ...

>> * make sure you move $HOME/.antrc while bootstrapping (just in case you
have
>> odd settings there)
>
>This never got created. I suppose it turns up once the compile is successful
>but I never got that far.

where you keep user settings for ant most people dont have it (this was
just a precaution incase you did).

>Where is this supposed to be? I don't find it anywhere on my system.

okay you will have to copy xerces.jar from your solaris system or
alternatively get xerces from cvs (goto xml.apache.org to get details).

>The difference I do find is the lack of the classes.zip file in the jdk1.2.2.
>Someone suggested that I configure the ant build to use jdk1.2.2 but I don't
>see where to do that. I did compile on the Solaris box with 1.1.8, I
believe. I
>can confirm that tomorrow but I know we are not running Java2 on that
machine.

CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/classes.zip:${JAVA_HOME}/lib/tools.jar
CLASSPATH=${CLASSPATH}:src/main:${CLASSDIR}

specifically look at these lines in bootstrap. JAVA_HOME should be set to
your java directory and you currently have it set to /usr/local/java. 

Verify that location contains JDK 1.2.2 and not the JRE 1.2.2 - in which
case /usr/local/java/lib/classes.zip should not exist but
/usr/local/java/lib/tools.jar should.

Make sure you are not using the kaffe virtual machine/compiler which comes
with default instal on some distributions (notably the red hat distros). In
which case try to uninstall it or put /usr/local/java/bin at the start of
PATH environment variable (by export PATH=/usr/local/java/bin:$PATH if in a
bourne style shell) .

other than that try running javac at commandline and getting compiler
version etc

Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*

Re: Compiling with jdk1.2.2 (Linux)

Posted by Dennis Gray <dm...@fareast.com.au>.
Thanks, Peter. I tried all of your suggestions but no luck.


> Very odd problem. Not sure exactly what the problem is but heres a few
> things to try
> * make sure you have write permission to directory and all files

This is exactly the same source that compiled okay on the Solaris box. Nothing
changed except the JDK version.

>
> * make sure you move $HOME/.antrc while bootstrapping (just in case you have
> odd settings there)

This never got created. I suppose it turns up once the compile is successful
but I never got that far.

> * make sure you run script from the base ant directory

Yup

>
> * make sure you include the required parser files in your classpath
> (xerces.jar)

Where is this supposed to be? I don't find it anywhere on my system.

>
> * make sure you never changed build.xml

Never touched it.

>
>
> Sorry if these sound simplistic but I can't think of anything that would
> cause this errors :P
>

The difference I do find is the lack of the classes.zip file in the jdk1.2.2.
Someone suggested that I configure the ant build to use jdk1.2.2 but I don't
see where to do that. I did compile on the Solaris box with 1.1.8, I believe. I
can confirm that tomorrow but I know we are not running Java2 on that machine.

Thanks for your help.

Dennis


Re: Compiling with jdk1.2.2 (Linux)

Posted by Peter Donald <do...@mad.scientist.com>.
At 08:05  22/6/00 +1000, you wrote:
>I then attempted to do this at home running the jdk1.2.2 for Linux that
>I got from Sun. I am attaching the output from what I got when I ran
>bootstrap.sh. If anyone can nudge me in the right direction as to what
>might be wrong, please let me know.

Very odd problem. Not sure exactly what the problem is but heres a few
things to try
* make sure you have write permission to directory and all files
* make sure you move $HOME/.antrc while bootstrapping (just in case you
have odd settings there)
* make sure you run script from the base ant directory
* make sure you include the required parser files in your classpath
(xerces.jar)
* make sure you never changed build.xml

Sorry if these sound simplistic but I can't think of anything that would
cause this errors :P

>:/usr/local/java/lib/classes.zip:/usr/local/java/lib/tools.jar:lib/xml.jar:
src/main:classes
>src/main/org/apache/tools
>src/main/org/apache/tools/ant/ProjectHelper.java:143: class Taskdef not
found in class org.apache.tools.ant.ProjectHelper
>            Task taskdef = new Taskdef();

oh and another thing it prolly would have been sufficient to only send a
few errors as they were all basically the same :P

Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*