• 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

set compiler

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need ant to copile using an older compiler than I usually use (jdk1.3.1_20). How can I instruct the ant target to use that compiler?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you really need to use a different compiler, or would it be sufficient to produce class files that can be run on an earlier JVM? The latter could be accomplished using the "source" and "target" javac options.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you fork, you can use an arbitrary compiler:
<javac executable="old_java" fork="yes" ...
 
Steve Watson
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The compiled code needs to be compatible with a special JSP compiler that the ERP app uses to compile the JSPs (unlike most J2EE apps, it requires jsps to be compiled before deployment). The JSP compiler must use a version of jdk1.3, in my case jdk1.3.1_20.

With the code:

<javac executable="old_java" fork="yes" ...

how do I point to a particular jdk?

Steve
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Steve,
The executable property is for point to the compiler you want to use. It's where I wrote "old_java".
 
reply
    Bookmark Topic Watch Topic
  • New Topic