Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Prepare Target Runtime for e4 e(fx)clipse Problem
Prepare Target Runtime for e4 e(fx)clipse Problem [message #1785868] Sat, 21 April 2018 08:16 Go to next message
Christian Eugster is currently offline Christian EugsterFriend
Messages: 214
Registered: July 2009
Location: St. Gallen Switzerland
Senior Member
Hi
Until ow I worked with jface and swt. Now I want to see if e(fx)clipse is a alternative in my work. I develope on macosx with java 9 and eclipse oxygen. When I try to set up the target platform I get errors:

http://download.eclipse.org/efxclipse/runtime-released/3.2.0/site

see attached picture

How can I resolve those dependencies? I tried with several combinations but did not succeed.

Any help is appreciated!

Christian
  • Attachment: target.jpeg
    (Size: 122.52KB, Downloaded 215 times)
Re: Prepare Target Runtime for e4 e(fx)clipse Problem [message #1785981 is a reply to message #1785868] Mon, 23 April 2018 19:27 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
See https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial4 - your target should only contain the runtime components. The problem is that while we e(fx)clipse can run on Java9 development on it is a bit problematic because of the javax.annotation debacle - https://github.com/eclipse/efxclipse-rt/issues/206
Re: Prepare Target Runtime for e4 e(fx)clipse Problem [message #1785990 is a reply to message #1785981] Mon, 23 April 2018 22:11 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
So the nightly now works on Java9 even as a development platform! Just follow the tutorial
Re: Prepare Target Runtime for e4 e(fx)clipse Problem [message #1786008 is a reply to message #1785990] Tue, 24 April 2018 06:39 Go to previous messageGo to next message
Christian Eugster is currently offline Christian EugsterFriend
Messages: 214
Registered: July 2009
Location: St. Gallen Switzerland
Senior Member
I shall try it as soon as possible. Thank you in the meantime for your help!
Christian
Re: Prepare Target Runtime for e4 e(fx)clipse Problem [message #1786112 is a reply to message #1785990] Wed, 25 April 2018 17:33 Go to previous messageGo to next message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 80
Registered: April 2017
Member
Thomas Schindl wrote on Mon, 23 April 2018 22:11
So the nightly now works on Java9 even as a development platform! Just follow the tutorial


Hi Tom,
I am still having problems with the IDE not being able to find @PostConstruct and @PreDestroy. The dependency is set to javax.annotation as an Imported Package.
I removed the target platform based on runtime 3.2.0 and created a new one based on the nightly runtime, but Eclipse still cannot find the annotations.
The product shows the new target platform (3.3.0) with all modules activated, and I can see javax.annotation there.
I then updated the tooling to the nightly version, rebooted Eclipse to force a workspace rebuild, but still no joy.
What am I missing here?
Thanks!

[Edit]
Well, one step forward. I just restarted the computer, launched Eclipse and that problem seems solved (I can launch the application with no problem). The problem that remains is compiling with maven after updating the efxclipse runtime repository to:

<repositories>
	<repository>
		<id>efxclipse-runtime</id>
		<layout>p2</layout>
		<url>http://download.eclipse.org/efxclipse/runtime-nightly/site</url>
	</repository>
        // Other repositories here
</repositories>


The maven 'clean' goal updated the repository information, but the compile still fails:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.1.0:compile (default-compile) on project com.jfx.suppliers.ui.model: Compilation failure: Compilation failure: 
[ERROR] /home/marcelo/jfx-workspace/com.jfx.suppliers.ui.model/src/com/jfx/suppliers/ui/model/list/SuppliersListController.java:[11] 
[ERROR] 	import javax.annotation.PostConstruct;
[ERROR] 	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import javax.annotation.PostConstruct cannot be resolved
[ERROR] /home/marcelo/jfx-workspace/com.jfx.suppliers.ui.model/src/com/jfx/suppliers/ui/model/list/SuppliersListController.java:[12] 
[ERROR] 	import javax.annotation.PreDestroy;
[ERROR] 	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import javax.annotation.PreDestroy cannot be resolved
[ERROR] /home/marcelo/jfx-workspace/com.jfx.suppliers.ui.model/src/com/jfx/suppliers/ui/model/list/SuppliersListController.java:[51] 
[ERROR] 	@PostConstruct
[ERROR] 	 ^^^^^^^^^^^^^
[ERROR] PostConstruct cannot be resolved to a type
[ERROR] /home/marcelo/jfx-workspace/com.jfx.suppliers.ui.model/src/com/jfx/suppliers/ui/model/list/SuppliersListController.java:[57] 
[ERROR] 	@PreDestroy
[ERROR] 	 ^^^^^^^^^^
[ERROR] PreDestroy cannot be resolved to a type
[ERROR] 4 problems (4 errors)


Is there any way to solve this?
Thanks!

[Updated on: Wed, 25 April 2018 17:48]

Report message to a moderator

Re: Prepare Target Runtime for e4 e(fx)clipse Problem [message #1786122 is a reply to message #1786112] Wed, 25 April 2018 19:51 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Ok - i'll look into this
Re: Prepare Target Runtime for e4 e(fx)clipse Problem [message #1786131 is a reply to message #1786122] Wed, 25 April 2018 22:44 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Ok I can reproduce this but I don't know yet why tycho is broken
Re: Prepare Target Runtime for e4 e(fx)clipse Problem [message #1786134 is a reply to message #1786131] Wed, 25 April 2018 23:10 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Ok I think the following is going on: Tycho does not add javax.annotation to the classpath when building because it assumes it is available from the JRE (because the EE suggest so)

The following possible fixes:
* Use a versioned package import instead of an unversioned
* Explicitly add javax.annotation to the compile-classpath throught "jars.extra.classpath=platform:/plugin/javax.annotation" in your build.properties

Re: Prepare Target Runtime for e4 e(fx)clipse Problem [message #1786187 is a reply to message #1786134] Thu, 26 April 2018 15:10 Go to previous message
Marcelo Ruiz is currently offline Marcelo RuizFriend
Messages: 80
Registered: April 2017
Member
I confirm that using a versioned javax.annotation (1.2.0) did the trick. Thanks!
Previous Topic:Export e4 Media Application
Next Topic:groovy editor in eclipse 4 rcp
Goto Forum:
  


Current Time: Sat Nov 09 01:42:52 GMT 2024

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

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

Back to the top