Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-core-dev] eclipse.ignoreApp property and "-noExit" argument can't work together


Sorry for the confusion Jason. I somewhat got confused with -console and -noExit.
For an undetermined reason I thought that what was keeping the framework alive was a waiting loop in the EclipseStarter whereas it is in fact the console that does it.





Thomas Watson <tjwatson@xxxxxxxxxx>
Sent by: platform-core-dev-bounces@xxxxxxxxxxx

11/01/2006 10:31 PM

Please respond to
"Eclipse Platform Core component developers list." <platform-core-dev@xxxxxxxxxxx>

To
"Eclipse Platform Core component developers list." <platform-core-dev@xxxxxxxxxxx>
cc
Subject
Re: [platform-core-dev] eclipse.ignoreApp property and        "-noExit"        argument can't work together






Pascal, in Jason's scenario there is no defined eclipse application running (because eclipse.ignoreApp=true) so EclipseStarter.run(String[] args, Runnable endSplashHandler) will return very fast.  The OSGi Framework will still be active (because osgi.noShudown=true).  But in this case control of the main thread is given back to WebStartMain which calls System.exit(result).


I think Jason has a point, maybe WebStartMain should not exit the VM if osgi.noShudown=true.  Jason, another option may be for you to define a headless application that does not return until you want the framework to shutdown and the VM to exit.


Tom.




"Jason Hao" <jason.hao@xxxxxxxxx>
Sent by: platform-core-dev-bounces@xxxxxxxxxxx

11/01/2006 09:04 PM

Please respond to
"Eclipse Platform Core component developers list." <platform-core-dev@xxxxxxxxxxx>

To
"Eclipse Platform Core component developers list." <platform-core-dev@xxxxxxxxxxx>
cc
Subject
Re: [platform-core-dev] eclipse.ignoreApp property and "-noExit"        argument can't work together







Pascal,

In fact before I sent the mail I debugged the code line by line. It seemed everything is okay. My activator was called, no exception thrown and the Main.run() method finished with exit code 0.

I read the code. The The EclipseStarter.class checks the osgi.noShudown property. Main.class checks the osgi.noShudown property too. But when the control is back to WebStartMain.class, it simply calls System.exit() without checking the osgi.noShudown property. I guess the control should not be back to the WebStartMain.class until an OSGi application terminates.

I also debugged as an equinox application. I found the Main.main() method exited after OSGi framework starts. But it left some threads keep running like "Frame Event Dispatcher", "Start Level Event Dispatcher" and etc. I didn't saw these threads there when I debugged it as web start application. Is it normal or abnormal?

On 11/2/06, Pascal Rapicault <
Pascal_Rapicault@xxxxxxxxxx> wrote:

>So I need to write a web start launcher by extending the WebStartMain class but with a different main() method for this issue. Am I right?
      No, I think the problem is somewhere else. It seems that your arguments are not being processed correctly or not even passed to eclipse. Have you check that the arguments are received by eclipse? Did you check the log?

      What I was trying to explain in my previous note is that in a running eclipse, the entity responsible to decide whether to exit or not is osgi itself not the webstartmain (see EclipseStart.run(,) and its use of the property
osgi.noShutdown. ) So even if you were to modify webstartMain, you would be left with a process that does nothing since osgi would have shutdown anyway.

Does that make sense?


PaScaL


"Jason Hao" <jason.hao@xxxxxxxxx >
Sent by:
platform-core-dev-bounces@xxxxxxxxxxx

11/01/2006 11:09 AM

Please respond to
"Eclipse Platform Core component developers list." <
platform-core-dev@xxxxxxxxxxx>


To
"Eclipse Platform Core component developers list." <platform-core-dev@xxxxxxxxxxx>
cc
Subject
Re: [platform-core-dev] eclipse.ignoreApp property and "-noExit"        argument can't work together









Yes, I know bug #
162097. I walked around it by changing the jar file name.For example, I changed org.eclipse.osgi_3.2.1.R32x_v20060919.jar to org.eclipse.osgi_3.2.1.R32x.v20060919.jar .

So I need to write a web start launcher by extending the WebStartMain class but with a different main() method for this issue. Am I right?

On 11/1/06, Pascal Rapicault <
Pascal_Rapicault@xxxxxxxxxx > wrote:

The -noExit argument is honored by osgi itself and not by the launchers.

I think you may have another problem that causes the startup sequence to fail.

If you are trying to start equinox from eclipse 3.2.1, it might be the problem bug #162097


HTH


PaScaL

"Jason Hao" < jason.hao@xxxxxxxxx>
Sent by:
platform-core-dev-bounces@xxxxxxxxxxx

11/01/2006 02:53 AM

Please respond to
"Eclipse Platform Core component developers list."        <
platform-core-dev@xxxxxxxxxxx >


To
platform-core-dev@xxxxxxxxxxx
cc
Subject
[platform-core-dev] eclipse.ignoreApp property and "-noExit"        argument can't work together











All,

I'm trying Java Web Start deployment with Equinox (Not RCP). In the JNLP file, I set the property eclipse.ignoreApp=true. Also I appended the "-noExit" argument to the main class. Just like below.


<application-desc main-class="org.eclipse.core.launcher.WebStartMain">
<argument>-nosplash</argument>
<argument>-noExit</argument>
</application-desc>

<resources>
<!-- Reference to the startup.jar. This does not change -->
<jar href="">
<property
    name="eclipse.ignoreApp"
    value="true"/>
......



The problem is the argument "-noExit" doesn't work. After check the code, I notice WebStartMain.main () mehtod calls System.exit(), which makes the web start application terminated. I wonder if osgi.noShutdown property should be checked before calling System.exit().


--
Best Regards,

Jason Hao
_______________________________________________
platform-core-dev mailing list

platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev


_______________________________________________
platform-core-dev mailing list

platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev





--
Best Regards,

Jason Hao
_______________________________________________
platform-core-dev mailing list

platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev


_______________________________________________
platform-core-dev mailing list

platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev





--
Best Regards,

Jason Hao
_______________________________________________
platform-core-dev mailing list
platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev

_______________________________________________
platform-core-dev mailing list
platform-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-core-dev


Back to the top