: Ant Users List
主题: 答复: javac task encountered a compiling error at the 'import' statement
I've tried setting the classpath and sourcepath, still didn't work. But if I
removed the problematic import statement, compiling ok, which means the
classpath and sourcepath is right.
I
fix.
But I when using Eclipse, setting the project's java compiler's 'Compiler
compliance level' to 1.3, it was ok.
-邮件原件-
发件人: 汪燕青 [mailto:wangyanq...@gameabc.com]
发送时间: 2011年3月22日 10:20
收件人: Ant Users List
主题: 答复: javac task encountered a compiling error at the
Can we see your build.xml? Sounds like a classpath/srcpath issue...
On Tue, 22 Mar 2011, 汪燕青 wrote:
Hi everyone,
When I’m building a simple project with ANT 1.8.2, I encountered a compiling
error at the import statement of the java code file.
There only 2 java files: A.java and com
Holy cow! Woo hooo
And to think all it was was a precompiled version of ant...
Glad its fixed!
Sanae Benchaaboun wrote:
Thanks, It's working now!!!
# ant
Buildfile: build.xml
clean:
[delete] Deleting directory /Data/Dev/StateApi_Ref/build
[delete] Deleting directory /Data/Dev/StateApi
Thanks, It's working now!!!
# ant
Buildfile: build.xml
clean:
[delete] Deleting directory /Data/Dev/StateApi_Ref/build
[delete] Deleting directory /Data/Dev/StateApi_Ref/src-gen
[delete] Deleting directory /Data/Dev/StateApi_Ref/dist
init:
[mkdir] Created dir: /Data/Dev/StateApi_Ref
I won't respond to the prior email you sent about installing...but just
include info here...
I do see one problem your ANT_HOME is probably wrong...
I think you want to make your ANT_HOME be /opt/jwsdp-2.0/apache-ant
Then you will want to make your PATH be this:
export PATH=$ANT_HOME/bin:$P
I already added the ANT_HOME in the environment varianbles and also dowloaded
the version of ant 1.6, but it's still using the default one whitch I think
it's the 1.5
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
>>> [EMAIL PROTECT
I think it'a 1.5 . can you tell me how to use the 1.6 instead of the 1.5,
because that one is using the gcc and default java version.
Thanks
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 5/1/2006 11:54:30 AM >
So this is a precompiled binary executable (see "ELF")... That explains
a lot. Can you download and run "normal" ANT from Apache (do not forget
to set correct ANT_HOME)?
- Alexey.
Sanae Benchaaboun wrote:
Are you sure you want me to edit the ant?? It's not readble!! Look what I got:
[EMAIL P
whoa...that is weird
For me, ant is actually a shell script
can you do this:
file `which ant`
When I do this, I get something like:
ant: Bourne shell script text executable
Which version of ant do you think you are running?
Sanae Benchaaboun wrote:
Are you sure you want me to edit the a
Are you sure you want me to edit the ant?? It's not readble!! Look what I got:
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL
PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@°<86>[EMAIL PROTECTED]@[EMAIL
PROTECTED]
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTEC
OK, lets get down and dirty :)
Edit your ant shell script:
vi `which ant`
At the top, make the shell script line look as follows:
#!/bin/bash -x
If you would, after the aforementioned change, try to run your ant
against your build.xml - and send me the output. I am very curious
about what
# echo $JAVA_HOME
/opt/SUNWappserver/jdk
# which java
/opt/SUNWappserver/jdk/bin/java
It's the same for ant, it's using the default one not the 1.6, because
the ant script you sent me didn't run, I had to specify the project
default and a target name, here
# echo $ANT_HOME
/opt/jwsdp-2.0/apache-an
Something else, run these and let me know the output:
echo $JAVA_HOME
which java
Sanae Benchaaboun wrote:
Hi Scott
I ran this ant script in that same shell window, look what I got:
Buildfile: build.xml
init:
[java] gij (GNU libgcj) version 3.5-tree-ssa 20030617 (Red Hat
Linux Rawhide 3.5
Sanae:
Yeah it is definitely using the gcc java. The way I was able to use
wscompile was to copy the jars to $ANT_HOME/lib:
jaxrpc-1_1-fr-spec-api.jar
jaxrpc-impl.jar
jaxrpc-spi.jar
Try placing those jars in that ant lib directory and then rerun against
the samples...
Sanae Benchaaboun wr
Hi Scott
I ran this ant script in that same shell window, look what I got:
Buildfile: build.xml
init:
[java] gij (GNU libgcj) version 3.5-tree-ssa 20030617 (Red Hat
Linux Rawhide 3.5ssa-48)
[java] Copyright (C) 2002 Free Software Foundation, Inc.
[java] This is free software; see t
Sanae:
OK, I -finally- got everything downloaded. I have no trouble executing
wscompile in the samples dir contained in JAXRPC_SI_20060427.class (well
that's the install app). I am assuming you have downloaded the
aforementioned class file and installed jaxrpc... As such, can you run
ant a
I modified my JAVA_HOME's to use IBM 1.5.0 JDK and Sun's 1.4.2_10.
When running that script I get the following:
IBM 1.5.0:
Buildfile: build.xml
[java] java version "1.5.0"
[java] Java(TM) 2 Runtime Environment, Standard Edition (build
pxi32dev-20051104)
[java] IBM J9 VM (build 2
Can you do me a favor? Run this ant script in that same shell window:
This should print out the java version... Still hadn't downloaded
wscompile yet...working on that now...
Sanae Benchaaboun wrote:
I got this now!!
I added the export JAVA_HOME and Path, also sat the for
Scratch that I think I found the URL...
Sanae Benchaaboun wrote:
I got this now!!
I added the export JAVA_HOME and Path, also sat the fork to false..
Still not working
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
[EMAIL PROT
Can you send me the exact URL where I can download the wscompile task?
I poked around a bit but am not finding readily
Sanae Benchaaboun wrote:
I got this now!!
I added the export JAVA_HOME and Path, also sat the fork to false..
Still not working
Sanae Benchaaboun
Webmaster Supervisor
Maryla
Thanks
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 4/28/2006 3:32 PM >>>
That's a bummer...
OK, I am gonna see about getting a wscompile tomorrow and see what I
can
figure out...
Sanae Benchaaboun wrote:
>
That's a bummer...
OK, I am gonna see about getting a wscompile tomorrow and see what I can
figure out...
Sanae Benchaaboun wrote:
I got this now!!
I added the export JAVA_HOME and Path, also sat the fork to false..
Still not working
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insuranc
I got this now!!
I added the export JAVA_HOME and Path, also sat the fork to false..
Still not working
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 4/28/2006 3:20 PM >>>
I looked over the documentation a littl
I looked over the documentation a little more (for wscompile) - and
looked at your build.xml. I do see where you have set forking = "true"
Maybe see what results you get when forking is set to false. In looking
at the stack trace - I see this:
at java.lang.ClassLoader.resolveClass0(java.lan
Check this link out:
https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html#2.1
And I quote: "The |wscompile| tool generates various client-side and
server-side artifacts required by the JAX-RPC runtime to develop,
deploy, and invoke a Web Service. It is available as a shell script and
What I am trying to say is this... My ~/.bashrc resembles the following:
# .bashrc
# User specific aliases and functions
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
This is of course a stock ~/.bashrc file...
I am saying, make the ~/.bashrc look some
What did you mean by putting all the export in a bashrc?
Here is the build.xml
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
Is it possible for me to get your build.xml? I had to do some searching
to find wscompile and what it is. As I have never used it, I don't know
anything about it...but I bet something is shelling out and a new
.bashrc / new environment is happening when shelling out. Try this:
put all those
Thanks for your help
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 4/28/2006 2:27 PM >>>
OK..sorry just trying to figure it all out :)
Rerun the command and send me the output (including how you are
executing
OK..sorry just trying to figure it all out :)
Rerun the command and send me the output (including how you are
executing from the command line)...
I just want to make extra sure now that you are in fact getting the same
error...
Sanae Benchaaboun wrote:
Yes I do use the same shell
Sanae Be
Yes I do use the same shell
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 4/28/2006 2:21 PM >>>
OK, I am almost at a loss... All seems correct... :(
So, again with all this set you still get the same results?
OK, I am almost at a loss... All seems correct... :(
So, again with all this set you still get the same results? Are you
using the same shell when you execute using ant? By that I mean in the
same window where you have shown me the results of "which java" etc you
are also running the ant co
# echo $JAVA_HOME
/opt/SUNWappserver/jdk
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 4/28/2006 2:08 PM >>>
Hmm - that seems correct. What about:
echo $JAVA_HOME
Sanae Benchaaboun wrote:
> # which java
> /
Hmm - that seems correct. What about:
echo $JAVA_HOME
Sanae Benchaaboun wrote:
# which java
/opt/SUNWappserver/jdk/bin/java
# java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
# which java
/opt/SUNWappserver/jdk/bin/java
# java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410
When you did the exports...did you:
a) Use the same shell (for instance bash)
b) From that same shell execute using ant?
Do this for me:
type:
which java
-and-
java -version
I will be curious to see... I don't think your environment is set up
correctly...
Sanae Benchaaboun wrote:
I did
I did what you saidt, I got the same error
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 4/28/2006 1:30 PM >>>
See where that version of java is installed... And add that as the
first entry in your PATH and JA
See where that version of java is installed... And add that as the
first entry in your PATH and JAVA_HOME... Sounds to me like its not
stored in /usr/bin (for instance its not symbolically linked). I'm
guessing you installed using the executable installer versus RPM's...
Let's say you insta
Actually the version of Java I have is from Sun. I am using redhat for
Linux.
Sanae Benchaaboun
Webmaster Supervisor
Maryland Insurance Administration
Tel: (410)468-2077
[EMAIL PROTECTED]
>>> [EMAIL PROTECTED] 4/28/2006 1:17 PM >>>
I am guessing you are probably running something like Fedora Core
I am guessing you are probably running something like Fedora Core? It
looks like gcc java problem - Fedora certainly comes with gcc java. If
you have Sun's (or better yet IBM's) JVM installed, make sure they can
be found in your path and JAVA_HOME...
Sanae Benchaaboun wrote:
Hi,
I using Ant
It looks like you are using gcc java (shudder).
""" /libgcj.so.4.0.0 """
Try using Sun's version.
Peter
On 4/28/06, Sanae Benchaaboun <[EMAIL PROTECTED]> wrote:
Hi,
I using Ant to build a project under Linux (using Redhat software) and
I am getting a ClassNotFoundException. If I try to
Hi,
I using Ant to build a project under Linux (using Redhat software) and
I am getting a ClassNotFoundException. If I try to build the same
project under Windows, it compiles successfuly.
Can you please help me!!
Attached you'll find the message given by Linux when compiling.
Thanks a lot.
P.S. I
43 matches
Mail list logo