Running App2 from App1
I've been doing some reading on this and I came across the Runtime Class, more importantly the Exec method. From my previous posts about a login method, now I want to run a second application after a successful login. I've never used the Exec method before, can someone explain it to me and possibly some examples. If thats not the way to go would someone point me in the right dircetion.
Thanks,
Colin
[423 byte] By [
codboya] at [2007-11-26 21:23:26]

The user logins in, this contains a main method. Once a a correct user name a password has been entered it will trigger a separate application to run (ie. separate jframe, jpanel, whatever you would call it, it's a separate program).And yes their both java class files. What would you suggest.
So what your saying is:
Application1 app1 = new Application();
Am I correct in saying that. Will this work when there is a main method in the second app. Plus I've tried what you've suggested (well, without having a main method in the second app) without any success. Would it be possible to get a small example of what tour doing.
The second app is where all the work is going to be done. The main method is located in the login app.
Thanks in advance.
Well, in this case you shouldn't have written the two parts as separate applications. Separate classes would be okay, then you'd just need a small application that used the login class and the processing class.
So what your saying is that I should write the main program and have a login class, plus I can do the same with the second app. If so, that makes alot more sense to me.