Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Restart Service not starting application after build(restart service)
icon6.gif  Restart Service not starting application after build [message #1729423] Thu, 14 April 2016 05:36 Go to next message
Milankumar Ardeshana is currently offline Milankumar ArdeshanaFriend
Messages: 27
Registered: August 2015
Junior Member
Hi All,

I came across Efxclipse/Runtime/Recipes#Restart_Service to restart the application.

I have handler and simple using as described in above link
@Execute
public void execute(RestartService restartService) {
	restartService.restart(true);
}


It works perfectly when i launch it from eclipse but after building executable its not coming back.
then i launched application using
java -jar -Dorg.osgi.framework.bundle.parent=ext org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
from Command Prompt but its just simple closing the application and not leaving any logs too.

Is this known problem?

Thanks,
Milan
Re: Restart Service not starting application after build [message #1729427 is a reply to message #1729423] Thu, 14 April 2016 06:14 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Restart ONLY works if you use the native launcher (which you can use on
windows and linux)

Tom

On 14.04.16 07:36, Milankumar Ardeshana wrote:
> Hi All,
>
> I came across
> https://wiki.eclipse.org/Efxclipse/Runtime/Recipes#Restart_Service to
> restart the application.
>
> I have handler and simple using as described in above link
>
> @Execute
> public void execute(RestartService restartService) {
> restartService.restart(true);
> }
>
> It works perfectly when i launch it from eclipse but after building
> executable its not coming back. then i launched application using java
> -jar -Dorg.osgi.framework.bundle.parent=ext
> org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar from Command
> Prompt but its just simple closing the application and not leaving any
> logs too.
>
> Is this known problem?
>
> Thanks,
> Milan
Re: Restart Service not starting application after build [message #1729435 is a reply to message #1729427] Thu, 14 April 2016 07:27 Go to previous messageGo to next message
Milankumar Ardeshana is currently offline Milankumar ArdeshanaFriend
Messages: 27
Registered: August 2015
Junior Member
Hi Tom,
Thanks for reply.

I am on windows environment only and following conventional build process. (Maven tycho build and then deployment of fx using ant). My build includes default configurations as below in pom.xml
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
	<resolver>p2</resolver>
	<pomDependencies>consider</pomDependencies>
	<environments>
		<environment>
			<os>noenv</os>
			<ws>noenv</ws>
			<arch>noenv</arch>
		</environment>
	</environments>
</configuration>


Thanks,
Milan
Re: Restart Service not starting application after build [message #1729447 is a reply to message #1729435] Thu, 14 April 2016 09:01 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Yes that needs to be changed and you need to include the native launcher
artifacts in your feature, and finally set the checkbox in your .product!

You need to specify:

>> <environments>
>> <environment>
>> <os>win32</os>
>> <ws>win32</ws>
>> <arch>x86</arch>
>> </environment>
>> </environments>


Tom

On 14.04.16 09:27, Milankumar Ardeshana wrote:
> Hi Tom, Thanks for reply.
>
> I am on windows environment only and following conventional build
> process. (Maven tycho build and then deployment of fx using ant). My
> build includes default configurations as below in pom.xml
>
> <groupId>org.eclipse.tycho</groupId>
> <artifactId>target-platform-configuration</artifactId>
> <version>${tycho-version}</version>
> <configuration>
> <resolver>p2</resolver>
> <pomDependencies>consider</pomDependencies>
> <environments>
> <environment>
> <os>noenv</os>
> <ws>noenv</ws>
> <arch>noenv</arch>
> </environment>
> </environments>
> </configuration>
>
>
> Thanks,
> Milan
Previous Topic:TreeItem problem in JavaxFX with EMF Edit
Next Topic:Bundle org.eclipse.fx.osgi not found :-(
Goto Forum:
  


Current Time: Fri Apr 19 01:42:26 GMT 2024

Powered by FUDForum. Page generated in 0.01881 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top