• 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] Keyboard input in forked java task

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to read input from the keyboard in a forked <java> task? When I execute a program that copies a line from the keyboard to the screen with fork="false" the program works OK. When I execute the same program with fork="true" the program hangs. Does anyone knows how to re-route the System.in of the new JVM to the keyboard?
BTW. I read Ant 1.60 might directly support re-routing of System.in . Does anyone know more about this?
Tnx
Bart
[ September 23, 2003: Message edited by: Bart Golsteijn ]
 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is slightly off your actual topic (I don't actually believe it is possible for a forked java task), but you could try re-writing your java program (if you have access to the source that is) as an Ant Task...
You can get/use keyboard input by using a combination of DefaultInputHandler and the various InputRequest classes.
 
Crusading Chameleon likes the size of this ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic