Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Launching e(fx)clipse
Launching e(fx)clipse [message #1786249] Fri, 27 April 2018 15:36 Go to next message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 66
Registered: April 2017
Member
Hi,
I am trying to launch a bare-bones e(fx)clipse application from Gradle, trying to duplicate the success described here for an older version of the e(fx)clipse platform:
https://github.com/mcmil/wuff-efxclipse-samples
but I get the following error:
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter

Does e(fx)clipse use that class to launch the application? If not, what is the launching mechanism used?
I think if I can get this working the implications could be huge for end users: easier testing, painless configuration, conventions could be easier to apply, cross-ide support, *much* faster builds, and so on...
Thanks!
Re: Launching e(fx)clipse [message #1786265 is a reply to message #1786249] Sat, 28 April 2018 18:33 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6402
Registered: July 2009
Senior Member
Our approach for cross-ide dev is maven - take a look how we start the framework - https://github.com/BestSolution-at/maven-osgi-plugin/tree/master/maven-osgi-exec-plugin/src/main/java/at/bestsolution/maven/osgi/exec
Re: Launching e(fx)clipse [message #1786266 is a reply to message #1786265] Sat, 28 April 2018 18:37 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6402
Registered: July 2009
Senior Member
And no we don't use the class you show but org.eclipse.equinox.launcher.Mai - see eg how we launch in Eclipse - https://github.com/eclipse/efxclipse-eclipse/blob/master/bundles/tooling/org.eclipse.fx.ide.mvnosgi.launching/src/org/eclipse/fx/ide/mvnosgi/launching/MVNOSGiApplicationLaunchConfiguration.java
Re: Launching e(fx)clipse [message #1786290 is a reply to message #1786266] Mon, 30 April 2018 01:44 Go to previous messageGo to next message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 66
Registered: April 2017
Member
Thanks for the information Tom, I will check it out. Is there currently any limitations when using Maven? I remember you mentioned you used it for a recent project...
Re: Launching e(fx)clipse [message #1786346 is a reply to message #1786290] Tue, 01 May 2018 19:24 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6402
Registered: July 2009
Senior Member
Not that I know of (beside running junit tests in osgi mode) and once we release a new version of our maven-plugin things get even more streamlined .
Re: Launching e(fx)clipse [message #1786360 is a reply to message #1786346] Wed, 02 May 2018 03:15 Go to previous messageGo to next message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 66
Registered: April 2017
Member
@Tom
I downloaded and installed the maven-plugin and then the sample e4 maven application. When I opened in Eclipse, the pom.xml file under sample.mvn.app shows an error (underlined in <parent>):

Description	Resource	Path	Location	Type
bnd error: The JAR/ZIP file (/home/marcelo/e4-efxclipse-maven-sample/sample.mvn.parent/sample.mvn.runtime.e4fx.feature/pom.xml) seems corrupted, error: zip END header not found (biz.aQute.bnd:bnd-maven-plugin:3.3.0:bnd-process:default-bnd-process:process-classes)

org.apache.maven.plugin.MojoExecutionException: bnd error: The JAR/ZIP file (/home/marcelo/e4-efxclipse-maven-sample/sample.mvn.parent/sample.mvn.runtime.e4fx.feature/pom.xml) seems corrupted, error: zip END header not found
	at aQute.bnd.maven.plugin.BndMavenPlugin.execute(BndMavenPlugin.java:230)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
	at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360)
	at org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52)
	at org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
	at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86)
	at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
Caused by: java.util.zip.ZipException: The JAR/ZIP file (/home/marcelo/e4-efxclipse-maven-sample/sample.mvn.parent/sample.mvn.runtime.e4fx.feature/pom.xml) seems corrupted, error: zip END header not found
	at aQute.bnd.osgi.ZipResource.build(ZipResource.java:64)
	at aQute.bnd.osgi.ZipResource.build(ZipResource.java:43)
	at aQute.bnd.osgi.Jar.<init>(Jar.java:79)
	at aQute.bnd.osgi.Jar.<init>(Jar.java:99)
	at aQute.bnd.osgi.Analyzer.addClasspath(Analyzer.java:2214)
	at aQute.bnd.osgi.Analyzer.setClasspath(Analyzer.java:1319)
	at aQute.bnd.maven.plugin.BndMavenPlugin.execute(BndMavenPlugin.java:213)
	... 32 more
Caused by: java.util.zip.ZipException: zip END header not found
	at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1252)
	at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1153)
	at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1160)
	at java.base/java.util.zip.ZipFile$Source.<init>(ZipFile.java:997)
	at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:960)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:216)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:148)
	at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:162)
	at aQute.bnd.osgi.ZipResource.build(ZipResource.java:49)
	... 38 more
	pom.xml	/sample.mvn.app	line 4	Maven Build Problem


Any idea on how to solve this?
Thanks
Re: Launching e(fx)clipse [message #1786408 is a reply to message #1786360] Wed, 02 May 2018 22:12 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6402
Registered: July 2009
Senior Member
The current state in the repository depends on the snapshot-version maven-plugin. You need to clone that repository and install the nightly version using "mvn install" and IMHO it looks like your .m2/repo is broken. You should maybe remove it so that they are downloaded once more
Re: Launching e(fx)clipse [message #1786410 is a reply to message #1786408] Thu, 03 May 2018 00:16 Go to previous messageGo to next message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 66
Registered: April 2017
Member
Tom,
Thanks for the reply.
I tried your suggestions but to no avail. I deleted the maven local repository altogether and downloaded and installed the maven plugin:
git clone https://github.com/BestSolution-at/maven-osgi-plugin.git
mvn clean install

Now, I switch to the sample procject and execute:
mvn clean verify

Maven has no problem:
[INFO] --- tycho-p2-director-plugin:1.0.0:archive-products (archive-products) @ sample.mvn.product ---
[INFO] Building zip: /home/marcelo/e4-efxclipse-maven-sample/sample.mvn.parent/sample.mvn.product/target/products/sample.mvn.app.product-noenv.noenv.noenv.zip
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] sample.mvn.parent .................................. SUCCESS [  0.169 s]
[INFO] sample.mvn.lib ..................................... SUCCESS [  3.437 s]
[INFO] sample.mvn.runtime.e4fx.feature .................... SUCCESS [  0.657 s]
[INFO] sample.mvn.app ..................................... SUCCESS [  1.000 s]
[INFO] sample.mvn.feature ................................. SUCCESS [  0.129 s]
[INFO] sample.mvn.product ................................. SUCCESS [ 24.848 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31.937 s
[INFO] Finished at: 2018-05-02T20:13:11-04:00
[INFO] Final Memory: 60M/200M
[INFO] ------------------------------------------------------------------------


Eclipse still shows the error in that pom.xml file.
Is Eclipse being cranky or am I doing anything wrong?
Thanks
Re: Launching e(fx)clipse [message #1786414 is a reply to message #1786410] Thu, 03 May 2018 03:57 Go to previous messageGo to next message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 66
Registered: April 2017
Member
Just a quick update. After the latest update on the nightly tooling (that happened actually a few minutes ago for me), the error in the pom.xml is gone.
Now the sample app at least tries to lunch. I updated the efxclipse.version property to 3.3.0 to use with Java 9 and I got the @PreDestroy annotation could not be found error. I am leaving for a short trip tomorrow and I will try to fix the problem with the versioned javax.annotation package. I will report back if I find a problem.
Thanks again!
Re: Launching e(fx)clipse [message #1786421 is a reply to message #1786414] Thu, 03 May 2018 06:59 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6402
Registered: July 2009
Senior Member
you need to update the pom-dependencies to include the javax.annotation bundle but I fear that we have not yet published that one to our maven-repository. I give you a heads up once that's done.
Re: Launching e(fx)clipse [message #1786990 is a reply to message #1786421] Wed, 16 May 2018 21:30 Go to previous messageGo to next message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 66
Registered: April 2017
Member
Thank you Tom. I'll wait for your confirmation to keep working on this...
Re: Launching e(fx)clipse [message #1791517 is a reply to message #1786990] Sun, 01 July 2018 17:13 Go to previous messageGo to next message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 66
Registered: April 2017
Member
Hi Tom,
Do you have an estimate on when this might happen?
Is it in your plans to automatically publish to the maven repository as part of releasing the new versions?
Thank you!
Marcelo.
Re: Launching e(fx)clipse [message #1791548 is a reply to message #1791517] Mon, 02 July 2018 11:38 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6402
Registered: July 2009
Senior Member
We released everything at the same moment. We also updated the same project on github IIRC
Re: Launching e(fx)clipse [message #1791614 is a reply to message #1786421] Mon, 02 July 2018 23:02 Go to previous messageGo to next message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 66
Registered: April 2017
Member
Thomas Schindl wrote on Thu, 03 May 2018 06:59
you need to update the pom-dependencies to include the javax.annotation bundle but I fear that we have not yet published that one to our maven-repository. I give you a heads up once that's done.


Thanks for you answer Tom.
Do I still need to wait for you to publish the javax.annotation bundle to your maven repository or can I get it from somewhere else. If so, which version should I use exactly?

Thank you!
Re: Launching e(fx)clipse [message #1792400 is a reply to message #1791614] Tue, 17 July 2018 08:42 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6402
Registered: July 2009
Senior Member
My wild guess is that the problem is that this got cached in your m2-directory. If you wipe that and start from an empty one it will work
Previous Topic:Css editor not recognizing certain properties
Next Topic:Interactive Splashscreen
Goto Forum:
  


Current Time: Sun Jul 22 23:50:01 GMT 2018

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

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

Back to the top