Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Tutorial 1 fails on Ant Build and is very slow
Tutorial 1 fails on Ant Build and is very slow [message #1123286] Wed, 02 October 2013 11:56 Go to next message
Gunnar Bernstein is currently offline Gunnar Bernstein
Messages: 1
Registered: October 2013
Junior Member
I am trying to get into JavaFX and installed as of the description (though there is no difference betweenn lazy and ambition install). I am developing for Android for a while so Eclipse Kepler is already installed.

The Tutorial worked until I tried to build.

a) Application Class is not mentioned.
Fix: I guess it should be: myapp.MyApplication

b) When trying to build and run ant I get multiple issues

b1) "Not a JDK", "The project is attached to a JRE only so ant would be started with a JRE which does not have a compiler. Would you like to proceed and select a JDK?"
Fix: Window->Preferences Add Java JDK (h**p://stackoverflow.com/a/1157618)

b2) Build path are not working with my system
	<target name="init-fx-tasks">
		<path id="fxant">
			<filelist>
				<file name="${java.home}\..\lib\ant-javafx.jar"/>
				<file name="${java.home}\lib\jfxrt.jar"/>
			</filelist>
		</path>

First I tried to just set the correct path:
				<file name="${java.home}\lib\ant-javafx.jar"/>
				<file name="${java.home}\..\jre7\lib\jfxrt.jar"/>

But this did not help.

Is there any way to configure how the build.xml is created? How and where do I set the correct classpath?
I use java version "1.7.0_25"
As this happens to a number of people, maybe it should be mentioned in the tutorial.

I then just copied the files to the locations desired by the build.xml, which resulted in a successful build.

Running the app

Starting the dist jar takes really long. On my Core7 with SSD it takes more than 11 Seconds (!), which is even longer then Eclipse itself needs to start. Am I missing something here? Running from Eclipse takes a split second. I could never deploy an app that takes so long to start. This does seem a general problem, because the oracle sample applications have the same start up time.
After some research I turned off my WiFi and now do not have that delay. Java setup issue? This is not the case when starting jars with Swing.

Your help and comments are appreciated!

Re: Tutorial 1 fails on Ant Build and is very slow [message #1124183 is a reply to message #1123286] Thu, 03 October 2013 09:09 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5419
Registered: July 2009
Senior Member
Hi Gunnar,

Thanks for the input - you saw that this is a wiki ;-) I think i already
replied to the on stackoverflow
(http://stackoverflow.com/questions/19136534/javafx-program-start-takes-12-seconds-when-online)

Your problem really sounds like a proxy resolution one! The FX-Launcher
somehow tries to do a proxy resolve.

More comments inline.

Tom

On 02.10.13 19:29, Gunnar Bernstein wrote:
> I am trying to get into JavaFX and installed as of the description
> (though there is no difference betweenn lazy and ambition install). I am
> developing for Android for a while so Eclipse Kepler is already installed.
>
> The Tutorial worked until I tried to build.
>
> a) Application Class is not mentioned. Fix: I guess it should be:
> myapp.MyApplication
>
> b) When trying to build and run ant I get multiple issues
>
> b1) "Not a JDK", "The project is attached to a JRE only so ant would be
> started with a JRE which does not have a compiler. Would you like to
> proceed and select a JDK?"
> Fix: Window->Preferences Add Java JDK (h**p://stackoverflow.com/a/1157618)
>

Ok so in the window that popped up you didn't get a JDK?

> b2) Build path are not working with my system
>
> <target name="init-fx-tasks">
> <path id="fxant">
> <filelist>
> <file name="${java.home}\..\lib\ant-javafx.jar"/>
> <file name="${java.home}\lib\jfxrt.jar"/>
> </filelist>
> </path>
>
> First I tried to just set the correct path:
>
> <file name="${java.home}\lib\ant-javafx.jar"/>
> <file name="${java.home}\..\jre7\lib\jfxrt.jar"/>
>

So where is the ant-javafx.jar located on your system and where is
${java.home} pointing to?

> But this did not help.
>
> Is there any way to configure how the build.xml is created? How and
> where do I set the correct classpath?

No there's no way to do that. Run the ant task with a JDK instead of a
JRE the paths should resolve fine.

> I use java version "1.7.0_25"
> As this happens to a number of people, maybe it should be mentioned in
> the tutorial.
>

Yep - it's a wiki, feel free to edit it :-)

> I then just copied the files to the locations desired by the build.xml,
> which resulted in a successful build.
>
> Running the app
>
> Starting the dist jar takes really long. On my Core7 with SSD it takes
> more than 11 Seconds (!), which is even longer then Eclipse itself needs
> to start. Am I missing something here? Running from Eclipse takes a
> split second. I could never deploy an app that takes so long to start.
> This does seem a general problem, because the oracle sample applications
> have the same start up time. After some research I turned off my WiFi
> and now do not have that delay. Java setup issue? This is not the case
> when starting jars with Swing.
>

Like said above this really sounds like this freaking proxy stuff
kicking in.

I'm not sure what to suggest. You can try to run with
-Djavafx.verbose=true then you should get some output from the lauchner
and it should tell you "Auto proxy detection is disabled in manifest."

Tom
Previous Topic:Maven build fails
Next Topic:Application.launch() hangs
Goto Forum:
  


Current Time: Thu Oct 23 18:09:55 GMT 2014

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

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