• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant - how do I pass parameters to forked javac?

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

I am currently running ant under java 1.3 (long story - but this is so I can run the Borland BES 5.1 java2iiop command - won't run under anything else).

I have a requirement to now use a third party java 1.5 built jar (Adgen 7.5 runtime). I can't do this in the 1.3, so my plan was to make the javac command run under java 1.5, but targeting the resulting classes back to 1.3 (using target=1.3).

I'm using the following task



However when the compiler is external the parameters to javac are ignored (I get a warning).

Is there any way to do this???

Without the options being passed, the resultant jar is a 1.5 jar - which just passes the problem up to the next layer in the system. At some point I need to bring the bytecode down to v1.3, and the lower the better as this is the only part of the system where we have a dependency on java 1.5.

Any other suggestions also welcome!

Regards
Steve
[ September 10, 2006: Message edited by: Steve Dalton ]
 
Steve Dalton
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just answering my own question here....

Just upgraded to Ant 1.6.5 (was using 1.6.2 before) and the fork now passes the parameters.

I now have another problem in that the java2iiop doesn't like my 1.3 targetted classes (insists they a v49 - which is java 1.5, but I have looked at them with a hex editor and they are definitely 47) - but this is another problem now not Ant.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic