Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Running OSGi Console(Cannot Run OSGi Console In Deployed Product)
Running OSGi Console [message #1632465] Tue, 24 February 2015 09:40 Go to next message
Christian Ora is currently offline Christian OraFriend
Messages: 20
Registered: May 2014
Junior Member
Hi there,

In my deployed efxclipse product, the osgi console simply doesn't show up on product startup. The "-console" argument is added. The plugins:

org.eclipse.equinox.console
org.apache.felix.gogo.command
org.apache.felix.gogo.runtime
org.apache.felix.gogo.shell

are existant in plugins-folder of the exported product. The default console doesn't show up too, although the argument "-consoleLog" is added.

I'm running the appplication on win 7 with java 1.8_20. Targetplatform is Luna with efxclipse 1.2 .

Any hints on this issue ?

Kind regards
Re: Running OSGi Console [message #1632701 is a reply to message #1632465] Tue, 24 February 2015 12:32 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
IIRC you need to use -console to use the OSGi console.
Re: Running OSGi Console [message #1632710 is a reply to message #1632701] Tue, 24 February 2015 12:40 Go to previous messageGo to next message
Christian Ora is currently offline Christian OraFriend
Messages: 20
Registered: May 2014
Junior Member
I did. I was just saying that the default console doesn't show up too. Smile
Re: Running OSGi Console [message #1632758 is a reply to message #1632710] Tue, 24 February 2015 13:12 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Is org.eclipse.equinox.console part of your product? Is it added in one of your product features?
Re: Running OSGi Console [message #1632765 is a reply to message #1632758] Tue, 24 February 2015 13:16 Go to previous messageGo to next message
Christian Ora is currently offline Christian OraFriend
Messages: 20
Registered: May 2014
Junior Member
It is. As well as:

org.apache.felix.gogo.command
org.apache.felix.gogo.runtime
org.apache.felix.gogo.shell

Has anyone tried to run a deployed efxclipse product with an osgi console, yet ?
Re: Running OSGi Console [message #1633041 is a reply to message #1632765] Tue, 24 February 2015 16:43 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
How are you launching the exported product? Did you use the
javafx-packager?

Please note that to pass a on command parameters you need to make the
javafx-packager aware of them.

Tom

On 24.02.15 14:16, Christian Ora wrote:
> It is. As well as:
>
> org.apache.felix.gogo.command
> org.apache.felix.gogo.runtime
> org.apache.felix.gogo.shell
>
> Has anyone tried to run a deployed efxclipse product with an osgi
> console, yet ?
Re: Running OSGi Console [message #1634297 is a reply to message #1633041] Wed, 25 February 2015 07:38 Go to previous messageGo to next message
Christian Ora is currently offline Christian OraFriend
Messages: 20
Registered: May 2014
Junior Member
I built it with maven and deployed it with the build.xml ant script. So i guess the product ist launched via equinox ?
Re: Running OSGi Console [message #1634305 is a reply to message #1634297] Wed, 25 February 2015 07:43 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Ok so this means you used the javafx-packager application! You need to
modify the build.xml file to make the native binary pass on the -console
-consoleLog flags!

See
http://docs.oracle.com/javafx/2/deployment/javafx_ant_task_reference.htm#CIACICCF
and
http://docs.oracle.com/javafx/2/deployment/javafx_ant_task_reference.htm#CIAHJIJG

Tom

On 25.02.15 08:38, Christian Ora wrote:
> I built it with maven and deployed it with the build.xml ant script. So
> i guess the product ist launched via equinox ?
Re: Running OSGi Console [message #1634556 is a reply to message #1634305] Wed, 25 February 2015 10:28 Go to previous messageGo to next message
Christian Ora is currently offline Christian OraFriend
Messages: 20
Registered: May 2014
Junior Member
Thank you for pointing me to this reference. I always felt that i was missing something.

Since "-console" and "-consoleLog" are program/application arguments. I assume the build.xml should look like this

<fx:application id="fxApplication" name="sandbox" mainClass="org.eclipse.equinox.launcher.Main" toolkit="swing">
<param name = "consoleLog"/>
<param name = "console"/>
</fx:application>

I tried several variations of this with "-console" & "-consoleLog" also tried the fx:argument and argument tag (basically the same i guess?). Neither brought the console to show up.

Btw. the eclipse.ini of the exported product looks like this

-nosplash
-consoleLog
-console
-vmargs
-Dosgi.framework.extensions=org.eclipse.fx.osgi
Re: Running OSGi Console [message #1634574 is a reply to message #1634556] Wed, 25 February 2015 10:36 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
On 25.02.15 11:28, Christian Ora wrote:
> Thank you for pointing me to this reference. I always felt that i was
> missing something.
>
> Since "-console" and "-consoleLog" are program/application arguments. I
> assume the build.xml should look like this
>
> <fx:application id="fxApplication" name="sandbox"
> mainClass="org.eclipse.equinox.launcher.Main" toolkit="swing">
> <param name = "consoleLog"/>
> <param name = "console"/>
> </fx:application>
>
> I tried several variations of this with "-console" & "-consoleLog" also
> tried the fx:argument and argument tag (basically the same i guess?).
> Neither brought the console to show up.
>
> Btw. the eclipse.ini of the exported product looks like this
>
> -nosplash
> -consoleLog
> -console
> -vmargs
> -Dosgi.framework.extensions=org.eclipse.fx.osgi
>


Noone is looking at this file, only the eclipse launcher would have but
the exe you see is generated by the javafx packager. Dod you try jvmArgs
I can remember having seen them working.

Tom
Re: Running OSGi Console [message #1634926 is a reply to message #1634574] Wed, 25 February 2015 14:26 Go to previous messageGo to next message
Christian Ora is currently offline Christian OraFriend
Messages: 20
Registered: May 2014
Junior Member
I added
<fx:platform>
	<fx:jvmarg value="-Xms0m"/>
	<fx:jvmarg value="-Xmx0m"/>	
</fx:platform>


which should produce an Error(Couldn't create Java Virtual Machine),
but after deploying via build.xml the applications starts as usual.
I also tried to monitor the jvm of the deployed product via jps, to see if jvm args(with proper values) are passed, but it said that the process information was unavailable.
Also , when i call Platform.getCommandlineArgs() or Application.getParameters(), the List is empty. Do you think it is possible that there might be a bug ?

[Updated on: Wed, 25 February 2015 14:26]

Report message to a moderator

Re: Running OSGi Console [message #1634953 is a reply to message #1634926] Wed, 25 February 2015 14:43 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
At least I know I used this on OS-X if I remember correctly. I'll give
it a try on os-x to see if it works.

Naturally you are most likely better of testing this with a simple
JavaFX application and once you are confident it works there as
advertised you then try applying this to e4+javafx.

Tom

On 25.02.15 15:26, Christian Ora wrote:
> I added <fx:platform>
> <fx:jvmarg value="-Xms0m"/>
> <fx:jvmarg value="-Xmx0m"/>
> </fx:platform>
>
> which should produce an Error(Couldn't create Java Virtual Machine),
> but after deploying via build.xml the applications starts as usual.
> I also tried to monitor the jvm of the deployed product via jps, to see
> if jvm args are passed, but it said that the process information was
> unavailable.
> Also , when i call Platform.getCommandlineArgs() or
> Application.getParameters(), the List is empty. Do you think it is
> possible that there might be a bug ?
Re: Running OSGi Console [message #1634962 is a reply to message #1634926] Wed, 25 February 2015 14:49 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I think I only tried:

<fx:platform>
<property name="purpose" value="sample value"/>
</fx:platform>

So you should be able to check them with
System.getProperties().getProperty("purpose").

Tom

On 25.02.15 15:26, Christian Ora wrote:
> I added <fx:platform>
> <fx:jvmarg value="-Xms0m"/>
> <fx:jvmarg value="-Xmx0m"/>
> </fx:platform>
>
> which should produce an Error(Couldn't create Java Virtual Machine),
> but after deploying via build.xml the applications starts as usual.
> I also tried to monitor the jvm of the deployed product via jps, to see
> if jvm args are passed, but it said that the process information was
> unavailable.
> Also , when i call Platform.getCommandlineArgs() or
> Application.getParameters(), the List is empty. Do you think it is
> possible that there might be a bug ?
Re: Running OSGi Console [message #1667950 is a reply to message #1634962] Thu, 12 March 2015 09:05 Go to previous messageGo to next message
Christian Ora is currently offline Christian OraFriend
Messages: 20
Registered: May 2014
Junior Member
A small update: It is possible to pass at least VM-Arguments by modifying the package.cfg file in the deployed product:

app.mainjar=plugins\org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
app.version=1.0
app.id=fxApplication
app.preferences.id=fxApplication
app.mainclass=org/eclipse/equinox/launcher/Main
jvmarg.1= -vmargument
app.classpath=


It took me quite long to figure that out, so i though it might be helpful to mention it here.

[Updated on: Thu, 12 March 2015 10:10]

Report message to a moderator

Re: Running OSGi Console [message #1668381 is a reply to message #1667950] Thu, 12 March 2015 13:06 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Thanks - from my understanding that's what the ant statements should
have produced, not?

Tom

On 12.03.15 02:05, Christian Ora wrote:
> A small update: It is possible to pass at least VM-Arguments by
> modifying the package.cfg file in the deployed product:
>
> app.mainjar=plugins\org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
> app.version=1.0
> app.id=fxApplication
> app.preferences.id=fxApplication
> app.mainclass=org/eclipse/equinox/launcher/Main
> jvmarg.1= -vmargument
> app.classpath=
>
> It took me quite long to figure that out, so i though it might be
> helpful to mention it here,
>
>
Re: Running OSGi Console [message #1678496 is a reply to message #1668381] Mon, 16 March 2015 08:06 Go to previous message
Christian Ora is currently offline Christian OraFriend
Messages: 20
Registered: May 2014
Junior Member
At least my attempts to modify the ant script did fail, no matter if i used property, param, argument or jvmarg.

pckage.cfg stayed:

app.mainjar=plugins\org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
app.version=1.0
app.id=fxApplication
app.preferences.id=fxApplication
app.mainclass=org/eclipse/equinox/launcher/Main
app.classpath=


But since i'm not familiar with ant, it might be possible that i put the statements/tags in wrong places, allthough tha ant script didn't complain.
Previous Topic:e(fx)clipse at EclipseCon NA 2015
Next Topic:I have installed the most recent e(fx)clipse AinO packages and it gives me this errors
Goto Forum:
  


Current Time: Fri Apr 19 21:37:46 GMT 2024

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

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

Back to the top