Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Basic question: How do I display a JavaFX application on a web page?(How do I display a JavaFX application on a web page?)
Basic question: How do I display a JavaFX application on a web page? [message #1730723] Thu, 28 April 2016 03:28 Go to next message
Reinhardt Christiansen is currently offline Reinhardt ChristiansenFriend
Messages: 36
Registered: March 2010
Member
I have a JavaFX application that uses a central database and will have multiple users running recent versions of Windows.

I was going to run the application via Java Web Start but that is apparently dead or dying. I assume that applets continue to be avoided for serious applications due to the many limitations on them.

It struck me that I'd like to embed my application on a web page where all users can then access the database regardless of where the user is. I wasn't sure if it was even possible to embed JavaFX on a web page but some googling produced this: http://stackoverflow.com/questions/27958019/embed-a-javafx-application-in-a-html-webpage#27958301

Unfortunately, I can't get this to work and the second comment on that page says it didn't work for him either. (In my case, Java keeps trying to install the current Java release even though it is already on my computer.)

Before I waste even more hours chasing my tail, I'd like to know categorically if it is possible to embed a JavaFX application on a web page. If so, HOW DO I DO IT? If someone could confirm it is indeed possible and point me to a detailed article or tutorial or manual describing the technique, I would really appreciate it.

I would also be open to suggestions on better designs, although I would be reluctant to give up JavaFX since I really like the TableView in JavaFX and already have the code working in a standalone application. (It's currently using a copy of DB2 on my laptop but I don't have a server at my disposal 24/7 where I can install a database that can be accessed by others.)

[Updated on: Thu, 28 April 2016 03:30]

Report message to a moderator

Re: Basic question: How do I display a JavaFX application on a web page? [message #1730736 is a reply to message #1730723] Thu, 28 April 2016 07:21 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6313
Registered: July 2009
Senior Member
Hi,

Applets are going to die - that's official and the way to go is to use
Webstart! Hence it is impossible to directly embed a JavaFX application
into a WebPage!

I'd even argue that WebStart is not the way to go for the future as it
relies on a System installed Java which is going to go away as well in
most companies.

The best way forward is to provide an msi/setup.exe produced by the
JavaFX packager.

Tom

On 28.04.16 05:28, Reinhardt Christiansen wrote:
> I have a JavaFX application that uses a central database and will have
> multiple users running recent versions of Windows.
> I was going to run the application via Java Web Start but that is
> apparently dead or dying. I assume that applets continue to be avoided
> for serious applications due to the many limitations on them.
> It struck me that I'd like to embed my application on a web page where
> all users can then access the database regardless of where the user is.
> I wasn't sure if it was even possible to embed JavaFX on a web page but
> some googling produced this:
> http://stackoverflow.com/questions/27958019/embed-a-javafx-application-in-a-html-webpage#27958301
>
>
> Unfortunately, I can't get this to work and the second comment on that
> page says it didn't work for him either. (In my case, Java keeps trying
> to install the current Java release even though it is already on my
> computer.)
> Before I waste even more hours chasing my tail, I'd like to know
> categorically if it is possible to embed a JavaFX application on a web
> page. If so, HOW DO I DO IT? If someone could confirm it is indeed
> possible and point me to a detail article or tutorial or manual
> describing the technique, I would really appreciate it.
> I would also be open to suggestions on better designs, although I would
> be reluctant to give up JavaFX since I really like the TableView in
> JavaFX and already have the code working in a standalone application.
> (It's currently using a copy of DB2 on my laptop but I don't have a
> server at my disposal 24/7 where I can install a database that can be
> accessed by others.)
Re: Basic question: How do I display a JavaFX application on a web page? [message #1730836 is a reply to message #1730736] Fri, 29 April 2016 00:27 Go to previous messageGo to next message
Reinhardt Christiansen is currently offline Reinhardt ChristiansenFriend
Messages: 36
Registered: March 2010
Member
Thank you, Tom, that gives me a direction to go in. I might as well get ahead of the curve and make msi my end-goal for my applications!
Re: Basic question: How do I display a JavaFX application on a web page? [message #1735290 is a reply to message #1730836] Fri, 17 June 2016 06:40 Go to previous message
richard sonkane is currently offline richard sonkaneFriend
Messages: 3
Registered: February 2016
Junior Member
Java 8 and your development environment compiled the class files into the bin folder.

Open a command shell and navigate to the project folder FxInHtml.

Create a package using

javapackager -createjar -outdir compiled -outfile myapp -appclass application.Main -srcdir bin -v
Now you have an executable myapp.jar file in the compiled folder.
Create the jnlp and html files using
javapackager -deploy -outdir deployed -outfile outfile -width 400 -height 400 -name AppName -appclass application.Main -v -srcdir compiled
The important thing to note is that "srcdir" is never any dir with java classes and it's different per javapackager directive. The output directory of the one javapackager call is the source dir of the other
Previous Topic:Equivalent of BusyIndicator
Next Topic:Can't Send Email using SMTP in JavaFX
Goto Forum:
  


Current Time: Fri May 26 05:59:12 GMT 2017

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

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