Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem running javac with ant in WAS 5

Status
Not open for further replies.

franckLepretre

Programmer
Sep 16, 2003
3
FR
Hi

I was working no problem with WAS and ANT.
the JRE was 1.3 and I needed to use 1.4.
I changed the default JRE to a 1.4 JRE.
When I try to compile uwing ant, I get:

Buildfile: C:\SNCF\monitor\monitorClient\script\build.xml

init:

compile:
[echo] start compilation from C:/SNCF/monitor/monitorClient/appClientModule
[javac] Compiling 10 source files to C:\projects\sncf\classes
BUILD FAILED: java.lang.NoSuchMethodError: java/lang/ClassLoader.setPackageAssertionStatus(Ljava/lang/String;Z)V
Total time: 1 second

I added rt.jar from version 1.4 in the classpath used by ant.It seems that running javac, the internal 1.3 JRE is used, but not the default JRE (1.4).

any idea what could be wrong ????
Thanks
Franck
 
I succeeded in getting it better loading tools.jar from eclipse.
I run the build to compile
<target depends=&quot;init&quot; name=&quot;compile&quot;>

<javac verbose=&quot;on&quot; executable=&quot;o:/tools/jdk1.4/bin/javac&quot;
debug=&quot;on&quot; deprecation=&quot;true&quot; destdir=&quot;${app.classes.dir}&quot; srcdir=&quot;${app.source.dir}&quot;>
<classpath>
<pathelement location=&quot;${driver.home}/db2java.zip&quot;/>
<pathelement location=&quot;${log4j.home}/dist/lib/log4j-1.2.8.jar&quot;/>
<pathelement location=&quot;${jdom.home}/lib/xml-apis.jar&quot;/>
<pathelement location=&quot;${jdom.home}/build/jdom.jar&quot;/>
<pathelement location=&quot;${jdom.home}/lib/xerces.jar&quot;/>
<pathelement location=&quot;${jdom.home}/lib/xalan.jar&quot;/> </classpath>
</javac>
<echo message=&quot;end compilation&quot; />
</target>

but still WAS uses the eclipse 1.3 files.
In the ouput I get :
[javac] [loading O:\toolsIBM\WebSphere Studio\Application Developer\v5.1\eclipse\jre\lib\rt.jar(java/sql/Connection.class)]
[javac] [loading O:\toolsIBM\WebSphere Studio\Application Developer\v5.1\eclipse\jre\lib\rt.jar(java/sql/DriverManager.class)]
[javac] [loading O:\toolsIBM\WebSphere Studio\Application Developer\v5.1\eclipse\jre\lib\rt.jar(java/sql/SQLException.class)]
[javac] [loading O:\toolsIBM\WebSphere Studio\Application Developer\v5.1\eclipse\jre\lib\rt.jar(java/sql/Statement.class)]
[javac] [loading O:\toolsIBM\WebSphere Studio\Application Developer\v5.1\eclipse\jre\lib\rt.jar(java/sql/ResultSet.class)]

No idea where I get it from, as the default JRE is set to the version 1.4 one ...

Any idea ?
 
I found that WAS 5 does not support JDK 1.4 ....
will have to use external window for ant.
 
Hi Frank,

I was wondering if you were able to figure out the problem. I am having the same issue with WSAD 5.1, I've tried adding the 1.4.1 tools.jar and got that message that you mentioned. I'm not sure how to get at it.

Thanks,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top