Skip to main content



      Home
Home » Eclipse Projects » e(fx)clipse » Native launcher for windows build (maven-tycho + ant) is not working for e4 OSGI application(Need some detailed information on build in windows environment)
icon1.gif  Native launcher for windows build (maven-tycho + ant) is not working for e4 OSGI application [message #1721540] Thu, 28 January 2016 03:33 Go to next message
Eclipse UserFriend
Hi all,
I am facing some problems in generating native(win) launcher for e4 efxclipse.

My configurations are as follows :
win 7,
e(fx)clipse - IDE - Basic 2.1.0.201508240705 org.eclipse.fx.ide.basic.feature.feature.group
target definition file:
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="slicer" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.fx.target.feature.feature.group" version="2.0.0.201506240602"/>
<repository location="http://download.eclipse.org/efxclipse/runtime-released/2.0.0/site/"/>
</location>


Steps i am following are as below :

My application getting run successfully from eclipse.

When i run my maven tycho build from cmd : "mvn clean install" its successfully getting finished.

Then when i try to run java -jar plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar -config configuration

I am getting logs in configuration directory as below.
!SESSION 2016-01-28 12:59:00.953 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_65
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -config configuration
Command-line arguments:  -config configuration

!ENTRY org.eclipse.equinox.ds 1 0 2016-01-28 12:59:01.767
!MESSAGE Could not bind a reference of component org.eclipse.fx.core.log4j.Log4JLoggerFactory. The reference is: Reference[name = registerAppender, interface = org.apache.log4j.Appender, policy = dynamic, policy-option = greedy, cardinality = 0..n, target = null, bind = registerAppender, unbind = unregisterAppender, updated = null]

!ENTRY org.eclipse.equinox.ds 1 0 2016-01-28 12:59:01.773
!MESSAGE Could not bind a reference of component org.eclipse.fx.core.internal.JUtilLoggerFactory. The reference is: Reference[name = registerHandler, interface = java.util.logging.Handler, policy = dynamic, policy-option = greedy, cardinality = 0..n, target = null, bind = registerHandler, unbind = unregisterHandler, updated = null]

!ENTRY org.eclipse.equinox.app 4 0 2016-01-28 12:59:01.781
!MESSAGE javafx/application/Application
!STACK 0
java.lang.NoClassDefFoundError: javafx/application/Application
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.fx.ui.workbench.fx.E4Application.getJfxApplicationClass(E4Application.java:322)
	at org.eclipse.fx.ui.workbench.fx.E4Application.launchE4JavaFxApplication(E4Application.java:307)
	at org.eclipse.fx.ui.workbench.fx.E4Application.start(E4Application.java:111)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application cannot be found by org.eclipse.fx.ui.workbench.fx_2.2.0.201601272351
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 20 more


and my config.ini is as below.

#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
#Thu Jan 28 12:42:44 IST 2016
eclipse.p2.profile=DefaultProfile
osgi.framework=file\:plugins/org.eclipse.osgi_3.10.101.v20150820-1432.jar
equinox.use.ds=true
osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.1.100.v20150423-1455.jar@1\:start
org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
eclipse.product=com.mil.trial.app.product
osgi.splashPath=platform\:/base/plugins/com.mil.trial.app
osgi.framework.extensions=reference\:file\:org.eclipse.osgi.compatibility.state_1.0.100.v20150402-1551.jar
osgi.bundles.defaultStartLevel=4
eclipse.p2.data.area=@config.dir/../p2
eclipse.application=org.eclipse.fx.ui.workbench.fx.application


Then i tried to build my ant build as JavaFX Packager is mandatory for native launcher.
I have got some errors.
So, I installed Wix and Inno setup 5 (5.5.6) as they were required for win environment.

Then again i tried to build ant.
It got successful.
So its having installer and .msi in deploy/bundle directory in releng project.

So when i execute installer it starts copying all data to C:\Users\user\AppData\Local\trial\
and when it finished it also run my trial.exe.

But no UI came up.

Then i found logs in C:\Users\user\AppData\Local\trial\app\workspace\.metadata\ .log as below without any exception.
!SESSION 2016-01-28 13:11:05.623 --------------x---------------------------------
eclipse.buildId=unknown
java.version=1.8.0_60
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US

!ENTRY org.eclipse.equinox.ds 1 0 2016-01-28 13:11:06.601
!MESSAGE Could not bind a reference of component org.eclipse.fx.core.log4j.Log4JLoggerFactory. The reference is: Reference[name = registerAppender, interface = org.apache.log4j.Appender, policy = dynamic, policy-option = greedy, cardinality = 0..n, target = null, bind = registerAppender, unbind = unregisterAppender, updated = null]

!ENTRY org.eclipse.equinox.ds 1 0 2016-01-28 13:11:06.603
!MESSAGE Could not bind a reference of component org.eclipse.fx.core.internal.JUtilLoggerFactory. The reference is: Reference[name = registerHandler, interface = java.util.logging.Handler, policy = dynamic, policy-option = greedy, cardinality = 0..n, target = null, bind = registerHandler, unbind = unregisterHandler, updated = null]

!ENTRY org.eclipse.equinox.ds 1 0 2016-01-28 13:11:06.959
!MESSAGE Could not bind a reference of component com.mil.trial.app.themes.default. The reference is: Reference[name = Stylesheet, interface = org.eclipse.fx.ui.services.theme.Stylesheet, policy = dynamic, cardinality = 0..n, target = null, bind = registerStylesheet, unbind = unregisterStylesheet]


My C:\Users\user\AppData\Local\trial\app folder also contains eclipse.ini and trial.cfg as below

elcipse.ini
-nosplash
-vmargs
-Dorg.osgi.framework.bundle.parent=ext


trial.cfg
[Application]
app.name=trial
app.mainjar=plugins\org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
app.version=1.0
app.preferences.id=fxApplication
app.mainclass=org/eclipse/equinox/launcher/Main
app.classpath=
app.runtime=$APPDIR\runtime
app.identifier=fxApplication

[JVMOptions]
-Dorg.osgi.framework.bundle.parent=ext

[JVMUserOptions]

[ArgOptions]



Is there anything wrong i am doing building steps?

Is there any way to verify build after tycho build has generated product?


Thanks in advance !
-Milan








Re: Native launcher for windows build (maven-tycho + ant) is not working for e4 OSGI application [message #1721869 is a reply to message #1721540] Mon, 01 February 2016 03:29 Go to previous messageGo to next message
Eclipse UserFriend
On 28.01.16 09:34, Milankumar Ardeshana wrote:
> Hi all,
> I am facing some problems in generating native(win) launcher for e4
> efxclipse.
>
> My configurations are as follows : win 7, e(fx)clipse - IDE - Basic
> 2.1.0.201508240705 org.eclipse.fx.ide.basic.feature.feature.group
> target definition file:
> <location includeAllPlatforms="false" includeConfigurePhase="true"
> includeMode="slicer" includeSource="true" type="InstallableUnit">
> <unit id="org.eclipse.fx.target.feature.feature.group"
> version="2.0.0.201506240602"/>
> <repository
> location="http://download.eclipse.org/efxclipse/runtime-released/2.0.0/site/"/>
>
> </location>
>
> Steps i am following are as below :
>
> My application getting run successfully from eclipse.
>
> When i run my maven tycho build from cmd : "mvn clean install" its
> successfully getting finished.
> Then when i try to run java -jar
> plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar -config
> configuration
>
> I am getting logs in configuration directory as below.
> !SESSION 2016-01-28 12:59:00.953
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.8.0_65
> java.vendor=Oracle Corporation
> BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
> Framework arguments: -config configuration
> Command-line arguments: -config configuration
>
> !ENTRY org.eclipse.equinox.ds 1 0 2016-01-28 12:59:01.767
> !MESSAGE Could not bind a reference of component
> org.eclipse.fx.core.log4j.Log4JLoggerFactory. The reference is:
> Reference[name = registerAppender, interface =
> org.apache.log4j.Appender, policy = dynamic, policy-option = greedy,
> cardinality = 0..n, target = null, bind = registerAppender, unbind =
> unregisterAppender, updated = null]
>
> !ENTRY org.eclipse.equinox.ds 1 0 2016-01-28 12:59:01.773
> !MESSAGE Could not bind a reference of component
> org.eclipse.fx.core.internal.JUtilLoggerFactory. The reference is:
> Reference[name = registerHandler, interface = java.util.logging.Handler,
> policy = dynamic, policy-option = greedy, cardinality = 0..n, target =
> null, bind = registerHandler, unbind = unregisterHandler, updated = null]
>
> !ENTRY org.eclipse.equinox.app 4 0 2016-01-28 12:59:01.781
> !MESSAGE javafx/application/Application
> !STACK 0
> java.lang.NoClassDefFoundError: javafx/application/Application
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
> at
> org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
>
> at
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
>
> at
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
>
> at
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
>
> at
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
>
> at
> org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>
> at
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.eclipse.fx.ui.workbench.fx.E4Application.getJfxApplicationClass(E4Application.java:322)
>
> at
> org.eclipse.fx.ui.workbench.fx.E4Application.launchE4JavaFxApplication(E4Application.java:307)
>
> at
> org.eclipse.fx.ui.workbench.fx.E4Application.start(E4Application.java:111)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
>
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.ClassNotFoundException:
> javafx.application.Application cannot be found by
> org.eclipse.fx.ui.workbench.fx_2.2.0.201601272351
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>
> at
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>
> at java.lang.ClassLoader.loadClass(Unknown Source)
> ... 20 more
>
>
> and my config.ini is as below.
>
> #This configuration file was written by:
> org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser
>
> #Thu Jan 28 12:42:44 IST 2016
> eclipse.p2.profile=DefaultProfile
> osgi.framework=file\:plugins/org.eclipse.osgi_3.10.101.v20150820-1432.jar
> equinox.use.ds=true
> osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.1.100.v20150423-1455.jar@1\:start
>
> org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
>
> eclipse.product=com.mil.trial.app.product
> osgi.splashPath=platform\:/base/plugins/com.mil.trial.app
> osgi.framework.extensions=reference\:file\:org.eclipse.osgi.compatibility.state_1.0.100.v20150402-1551.jar
>
> osgi.bundles.defaultStartLevel=4
> eclipse.p2.data.area=@config.dir/../p2
> eclipse.application=org.eclipse.fx.ui.workbench.fx.application
>

if you launch with java -jar you need to pass the
Dorg.osgi.framework.bundle.parent=ext

>
> Then i tried to build my ant build as
> https://docs.oracle.com/javafx/2/deployment/packager.htm is mandatory
> for native launcher.
> I have got some errors.
> So, I installed Wix and Inno setup 5 (5.5.6) as they were required for
> win environment.
>
> Then again i tried to build ant.
> It got successful. So its having installer and .msi in deploy/bundle
> directory in releng project.
>
> So when i execute installer it starts copying all data to
> C:\Users\user\AppData\Local\trial\
> and when it finished it also run my trial.exe.
>
> But no UI came up.
>
> Then i found logs in
> C:\Users\user\AppData\Local\trial\app\workspace\.metadata\ .log as below
> without any exception.
> !SESSION 2016-01-28 13:11:05.623
> --------------x---------------------------------
> eclipse.buildId=unknown
> java.version=1.8.0_60
> java.vendor=Oracle Corporation
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
>
> !ENTRY org.eclipse.equinox.ds 1 0 2016-01-28 13:11:06.601
> !MESSAGE Could not bind a reference of component
> org.eclipse.fx.core.log4j.Log4JLoggerFactory. The reference is:
> Reference[name = registerAppender, interface =
> org.apache.log4j.Appender, policy = dynamic, policy-option = greedy,
> cardinality = 0..n, target = null, bind = registerAppender, unbind =
> unregisterAppender, updated = null]
>
> !ENTRY org.eclipse.equinox.ds 1 0 2016-01-28 13:11:06.603
> !MESSAGE Could not bind a reference of component
> org.eclipse.fx.core.internal.JUtilLoggerFactory. The reference is:
> Reference[name = registerHandler, interface = java.util.logging.Handler,
> policy = dynamic, policy-option = greedy, cardinality = 0..n, target =
> null, bind = registerHandler, unbind = unregisterHandler, updated = null]
>
> !ENTRY org.eclipse.equinox.ds 1 0 2016-01-28 13:11:06.959
> !MESSAGE Could not bind a reference of component
> com.mil.trial.app.themes.default. The reference is: Reference[name =
> Stylesheet, interface = org.eclipse.fx.ui.services.theme.Stylesheet,
> policy = dynamic, cardinality = 0..n, target = null, bind =
> registerStylesheet, unbind = unregisterStylesheet]
>

These logs are ok and a "bug" in equinox ds so I have indication what is
wrong.

Tom
Re: Native launcher for windows build (maven-tycho + ant) is not working for e4 OSGI application [message #1722005 is a reply to message #1721869] Tue, 02 February 2016 03:46 Go to previous messageGo to next message
Eclipse UserFriend
Hi tom,
Thanks Smile
yes its working from Command line now.

Problem was with DLL path. It was not having local path to my dlls then i had to give properties to fx packager via build.xml

<fx:platform basedir="${java.home}">
	 <fx:property name="org.osgi.framework.bundle.parent" value="ext"/>
	 <fx:property name="log4j.configuration" value="platform:/plugin/com.mil.trial.fx.app.app/log4j.properties "/>
	 <fx:property name="java.library.path" value="C:\UserData\Trial_dlls"/></fx:platform>
icon3.gif  Re: Native launcher for windows build (maven-tycho + ant) is not working for e4 OSGI application [message #1722374 is a reply to message #1722005] Thu, 04 February 2016 06:24 Go to previous message
Eclipse UserFriend
just adding this point for information for others.

I was working on native launcher on windows and found that icon is not getting replaced with my application icon.

I googled and found this .

And tried it as below and it worked Smile


1) I copied my icons to releng project.
2) I edited my build.xml as below pointing my icon file in <fx:icon> tag.

<fx:deploy
	verbose="true" 
	embedJNLP="false"
	extension="false"
	includeDT="false"
	offlineAllowed="true"
	outdir="${basedir}/deploy"
	outfile="fix-ide"
	nativeBundles="all"
	updatemode="background"
	>      
	<fx:platform basedir="${java.home}">
	        <fx:property name="org.osgi.framework.bundle.parent" value="ext"/>
		<fx:property name="log4j.configuration" value="platform:/plugin/com.mil.trial.fx.app.app/log4j.properties "/>
		<fx:property name="java.library.path" value="C:\UserData\trial_dlls"/>
	</fx:platform>
	<fx:info title="trial" vendor="mil">
		<fx:icon href="./icons/icons/bmp/trial.ico" />
	</fx:info>
	<fx:application refid="fxApplication"/>
	<fx:resources refid="appRes"/>
</fx:deploy>


[Updated on: Thu, 04 February 2016 06:25] by Moderator

Previous Topic:CSS editor doesn't work sometimes
Next Topic:When I am launching native exe of media application in tutorial 3 throwing exception
Goto Forum:
  


Current Time: Wed Jul 23 13:44:56 EDT 2025

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

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

Back to the top