Hi,
I noticed in your code you call System.exit() in a few places.
Example: org.tn5250j.My5250.main()

Advertising

This makes it difficult to call this method from other Java code.
Is there a recommended way to spawn new connections using the same virtual
machine?
Example: I want to spawn your app from another app.
On idea, is call java.exe externally and pass the JAR name.
But I would rather call into your JAR directly -- same virtual machine (VM).
When I use a basic threading design, it won't work because System.exit()
terminates the VM.
However, I built a very basic SecurityManager to trap calls to System.exit().
[Source:
http://stackoverflow.com/questions/309396/java-how-to-test-methods-that-call-system-exit]
Now my solution works... but it is a slight hack.
Can you please provide the correct API calls... or remove System.exit() from
your code?
We are big fans here. Keep up the good work.
Please advise.
Thanks,
Arpe
This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.