• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

how to use ant jar command with -xlint

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am using jdk 1.5, database hsqldb_1_7_0 which supports upto 1.4.

but i used 'ant' command under D:\Room_Mates\riyaz\Installd\hsqldb_1_7_0\hsqldb\build > ant jar
in order to build hsqldb.jar file so that i can paste it to /common/lib directory in tomcat.

what i got was 2 compilation errors. i was asked to recomplile with
-Xlint.

what to do. i cant uninstall jdk 1.5 as i have allready installed netbeans5.5(inbuilt with app server) which supports jdk1.5.

kindly reply thank you.
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
googling on ant and xlint lead me to Roseanne Zhang's Ant FAQ (FYI there's a link to the FAQ at the top of this Ant, Maven and Other Build Tools Forum).

How to pass -Xlint or -Xlint:unchecked to 1.5 javac task?


A: pass it as compilerarg nested <compilerarg> to specify.
<compilerarg value="-Xlint"/>
<!-- or -->
<compilerarg value="-Xlint:unchecked"/>



Note that this needs to be added to the javac task. If you check your build you should find that the jar target has dependencies that directly or indirectly include a target with the javac task.

Ant manual
[ October 11, 2006: Message edited by: Carol Enderlin ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic