Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

passing objects to process

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I need to create a new process and pass a number of objects to its constructor.
I know I could serializes these objects and deserialize them in created process, but is there a way to avoid it?
Or perhaps there is a way to share memory among processes?
I found on the internet a thing called JOPI: a Java object-passing interface (http://portal.acm.org/citation.cfm?id=583815&dl=GUIDE&coll=GUIDE&CFID=53393199&CFTOKEN=39328707) but I cannot find jar with JOPI anywhere.

Thank you in advance for answering!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What was wrong with your idea of passing the objects to the constructor?
 
Krzysztof Jurkowski
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:What was wrong with your idea of passing the objects to the constructor?


I thought that the only way to start a new process in java is to use Runtime or ProcessBuilder. Let me know if I'm wrong, but I thought that all you can pass to Runtime or ProcessBuilder are String arguments.
Than if you call Runtime.exec (ProcessBuilder.start), all string arguments are passed to static void main.

Since I don't know the solution of my problem perhaps I didn't make myself clear - I don't know how this can be achieved, but I need to execute a class in a separate process and I need to pass an Object arguments to the constructor.

reply
    Bookmark Topic Watch Topic
  • New Topic