• 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

java hangs when run build in background

 
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
I have a build file that runs a Java program. I've been able to simplify the problem to the point where I'm left with a build file that compiles and runs the program along with a program that just does a System.out.println.

When I run the build in Windows or UNIX (foreground), it works as expected. All the build.xml echos are output as is the System.out.println. When I run the program in the background, it appears to hang. It writes "end compile" to the log file (where System.out is redirected to.) If I run the "jobs" command, it shows as STOPPED which is odd. If I type "fg" it continues to run.

The same effect occurs if I remove the println and have a Java file that does nothing.

I've run builds before in the background. The major difference being that they don't call <java>. Any ideas what is going on? I'm at a loss for why the program goes into stopped state.

Note: The problem exists even if I don't fork the JVM. (The fork is there because the real program needs to fork.)



 
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
Oddly enough, <exec> doesn't cause this problem. I guess I'm using <exec> to call Java as a workaround.
reply
    Bookmark Topic Watch Topic
  • New Topic