• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
  • Tim Holloway
  • Carey Brown
  • salvin francis

Misbehaving User Threads

Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a c++ wrapper to launch jvm and run a java app. The main class is not a thread, but starts some (user) threads. The cpp program killed all the threads once main returned. So I was trying to retain it, by joining the main thread to one of the user threads. This worked fine (ie, the app ran fine as long as i wanted).
Now I'm making that cpp program as a service. This join() call hangs the service, so the service doesnt start fully. I removed the join call, and started the service. This runs fine for a few seconds, and again all user threads die after that brief moment.
Is there anyway to keep the threads alive?
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
professionally read, modify and write PDF files from Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!