[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipse-dev] Question about RCP & JVM
|
If you want to share the same JVM, the you would have to launch it from
your application. something like:
org.eclipse.core.launcher.Main.main(new String[]{...arguments here...})
in order to have the proper classpath set you can either:
- launch your AWT application with the whole classpath
- load the org.eclipse.core.launcher.Main using URLClassLoader, to which
you have specified all the additional jar's you need, and then, using
reflection, call it's main method.
Just an ideea, that I believe it would work reglardless of platform
(your runRCP.cmd works only on windows, bad bad for java).
Sergiu.
Zhang Zhuo wrote:
> Hi all,
>
> I have developed an RCP application, which can be run successfully with
> a "runRCP.cmd" file, whose contents is: " echo on
> setlocal
> cd %~dp0
> java -cp startup.jar org.eclipse.core.launcher.Main -application
> com.eclpise.examples.DemoApplication -consoleLog %* || pause
> endlocal".
>
> Then I create another java application(named "AnotherApp", an awt based
> GUI program, only one button named "Invoke My RCP" in the frame). What I
> want to do is to run my RCP application by clicking the button.
> While a very IMPORTANT request is that: the new running RCP application
> should share the same JVM with "AnotherApp" that invokes it. I wonder if
> it's possible to realize my request, if it does how may I relize?
>
> BTW, I have tried something following, which will create a new JVM for
> RCP application:
> " ... ....
> try {
> Process process = Runtime.getRuntime().exec
> ("C:/myRCP/runRCP.cmd"); }
> catch ... ..."
>
> Waiting for your suggestions!!! Thanks.
>
>
> Best Regard,
> Martin
>
>
> _______________________________________________
> eclipse-dev mailing list
> eclipse-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> http://dev.eclipse.org/mailman/listinfo/eclipse-dev
>