Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visualization demo web page is an applet, i.e. not supported by modern browsers #523

Open
jsichi opened this issue Mar 19, 2018 · 20 comments
Labels
bug gsoc candidate task for Google Summer of Code

Comments

@jsichi
Copy link
Member

jsichi commented Mar 19, 2018

This is the page in question:

http://jgrapht.org/visualizations.html

If we're going to keep it, it would have to change to a Java WebStart instead (with a JNLP file).

It also needs to be updated for the fact that we're dropping the JGraph dependency in favor of JGraphX.

@jsichi jsichi added the bug label Mar 19, 2018
@jkinable
Copy link
Collaborator

jkinable commented Mar 20, 2018 via email

@jsichi jsichi added the gsoc candidate task for Google Summer of Code label Oct 9, 2018
@ksskreddy
Copy link

If this issue has not been resolved, I'll be happy to resolve it. Can I work on it?

@jkinable
Copy link
Collaborator

Sure go ahead.

@ksskreddy
Copy link

Hi,
Thanks for letting me work on this issue.

Java Web Start technology has built-in support for applets.we can just change the applet HTML tags to a Java Network Launching Protocol (JNLP) file. refer this https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/applet_migration.html.

Shall I try this or rewrite applet as Java Web Start Application?

@jsichi
Copy link
Member Author

jsichi commented Dec 15, 2018

You can use whatever approach works best. But as noted above, you'll also have to update the demo to use JGraphX instead of JGraph; so you won't be able to use the old applet unchanged.

@ksskreddy
Copy link

ksskreddy commented Dec 15, 2018

I have done coding the JNLP file.Needed jgrapht-core, jgrapht-bundle,jgrapht-demo jar files for the same.plz specify me where these will be there on the server so that i can finalise the jnlp file code.

Thanks,

@ksskreddy
Copy link

Most browsers didn't have java support.so using JNLP and java WebStart also,we cannot run the applet inside the browser.The only way was to provide downloadable link to JNLP file and using this file applets can be run on the device if java was installed .

@jsichi
Copy link
Member Author

jsichi commented Dec 17, 2018

Regarding the jar locations:

  1. I suggest you get it working on your own test server first (if you have one) and then tell us the URL to look at. Once you've done that, we can review it and decide how to deploy it on the real jgrapht website. (If you don't have your own public test server, maybe set up an instance on Amazon's EC2 free tier.)

  2. The bundle jar is very large and includes a lot of unneeded stuff. So it would be better if you can narrow the jar list down to just the necessary dependencies (e.g. JGraph).

@ksskreddy
Copy link

I have deployed it in azure. plz have a look and suggest me if any changes required.
https://visualizationsdemo.azurewebsites.net/

I have made the jar with only required dependencies(by using eclipse option make Runnable jar).It was about 7.5MB.

@jsichi
Copy link
Member Author

jsichi commented Dec 18, 2018

Thanks, I was able to get it to run, but only after adding the URL to my "Exception Site List" from my Java control panel. Chrome keeps complaining that my Java version is out of date, even though I am running with the latest JDK 8 (1.8.0_191-b12). Maybe that's because JDK 8 is EOL. I'll play around with it and see what happens with JDK 9 or 10 installed. We'll also want to add a signed certificate.

@ksskreddy
Copy link

I have tested with ubuntu 16.01 with icedtea-web 1.6.2 version and with same JDK version.I haven't got any such complaints.Update me the further steps after trying with JDK 9 and JDK 10.

@jsichi
Copy link
Member Author

jsichi commented Dec 20, 2018

I tried it with various Oracle JRE versions but got the same error with all of them. Instead of testing with icedtea-web, can you try with an Oracle JRE?

@ksskreddy
Copy link

I have tried out ORACLE JRE and got the same errors.I managed to get rid of java out of date error.I have also added a self signed certificate to the jar. Now the only thing is it is blocked by java security so adding to exception list opens it.

We need to sign the jar with a trust worthy certificate to remove that error too.

@jsichi
Copy link
Member Author

jsichi commented Dec 25, 2018

Oof. Creating a properly signed jar appears to be a bit of a pain, and it isn't even free-as-in-beer. (Also it appears that from Java 11 onward, javaws may be going away completely.) Let's get everything else worked out and tested via the exception list, and then we can follow up with the certificate.

You currently have it packaged as a single demoX.jar. Is that actually necessary, or can we just include multiple jar resources? It would be preferable to use our standard jars directly; that way we can just set up the deployment to use the result of the build instead of needing to create a special jar.

@ksskreddy
Copy link

We can include multiple jar resources. But then we need only few of the bundle.jar classes(to reduce the size).I will check the exact classes required from bundle.jar and update you.

@ksskreddy
Copy link

This is the list of dependency jars apart from the jgraph-core jar

  1. antlr4-runtime
    2)commons-io, commons-lang3, commons-math3,commons-text
    3)hamcrest-core, hamcrest-library
  2. jgraphx
    5)jheaps
    6)jmh
    7)junit
  3. jopt,mockito,objenesis

@jsichi
Copy link
Member Author

jsichi commented Dec 26, 2018

A. The test/perf dependencies (hmacrest, jmh, junit, jopt, mockito, objenesis) should not be required at all.

B. Why are antlr and commons-* required? jgrapht-ext used to depend on jgrapht-io, but it no longer does.

@ksskreddy
Copy link

They all are unnecessary. Only external dependency required is jgraphx .
I have updated the sample website with only the required jars. It was working fine with Ubuntu and icedtea-web.

But when i tried with windows jre 8 it showed error stating application blocked by java eventhough I added the exception site list.I could not get the reason why it was happening.please check it once if you could find anything.

@jsichi
Copy link
Member Author

jsichi commented Jan 4, 2019

Probably those jars need self-signed certificates?

@ksskreddy
Copy link

Already tried but no luck.The current sample website contained the jars self signed by me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug gsoc candidate task for Google Summer of Code
Projects
None yet
Development

No branches or pull requests

3 participants