Using Java, I would like to calculate the alpha shape: given a set of 2D points, I want to find a list of polygons with minimal area that contain all the points. Here is some more information. A pure Java solution would be ideal. Code that I can port from other languages to Java would be fine. I'd rather not use a native wrapper. An explanation of the algorithm that I could implement with reasonable effort would also be fine.
What I really need are the triangles that make up the alpha shape polygons, so extra credit for that.
This page has a nice Java applet with GPL source that does what you want. There's also the full paper describing the algorithm further down.
It doesn't do the triangle tessellation part, but there are many available libraries for that once you have a polygon. If nothing else, openGl has an excellent tessellator you can use or pull from.
I'm not sure if these are the applet and papers described by #Geobits, but there are an applet and some papers that can now be found at this link.
However, that's just the beginning of your problem. Most modern browsers won't support Java applets. This is due to stuff about NPAPI and security; for details, see e.g. the link preceding this sentence. This lack of default support happened around fall 2015.
Rather than detail the full solution, I suggest you visit Oracle's descripton of how to get applets to run. It shows how to enable Applets in Internet Explorer (IE), Firefox, and Safari (I have no idea about Microsoft Edge).
You can no longer even enable Java in Chrome. One work-around basically emulates IE in Chrome. It's described here.
Note that I tested this applet using the methods described on IE and Firefox, both run on Windows 10. I had to change the Java security settings as described in the next paragraph. For IE, the applet came up just fine. For Firefox, I had to click on the button that looks like a lego in the upper-left. Part of the applet worked, but I couldn't get it to allow me to insert points.
Believe it or not, that's still not the end of it. You'll also need change the Java security settings so that the site in question can run Java. Once again, Oracle has an article describing that. Look for the screenshot with the Exception Sites List section and, when you get to that point on your computer, press the Edit Site List button and follow the prompts. You want to add http://cgm.cs.mcgill.ca/~godfried/teaching/projects97/belair/alpha.html to list list of excepted sites.
One other option is going to:
http://cgm.cs.mcgill.ca/~godfried/teaching/projects97/belair/
and downloading alpha.zip. You can also just go straight to the download link:
http://cgm.cs.mcgill.ca/~godfried/teaching/projects97/belair/alpha.zip
Navigate into the directory where you downloaded it, extract the contents, go to the new alpha directory, and run
appletviewer Alpha.html
You will, however, need to find an earlier version of Java - preferably Java 1.1, but I think anything before Java 5 will work.
Good luck getting it to run!
More info:
https://blog.mozilla.org/futurereleases/2015/10/08/npapi-plugins-in-firefox/
Mozilla intends to remove support for most NPAPI plugins in Firefox by the end of 2016. Firefox began this process several years ago with manual plugin activation, allowing users to activate plugins only when they were necessary. This decision mirrors actions by other modern browsers, such as Google Chrome and Microsoft Edge, which have already removed support for legacy plugins.
http://www.ghacks.net/2016/04/11/firefox-drm-and-the-end-of-npapi/
The most popular plugins currently supported are Adobe Flash and Java, but there are more plugins that Firefox may pick up to make their functionality available.
Google kicked NPAPI out in Chrome 45 when it stopped support for NPAPI, and Mozilla announced that it would end support as well.
Google's advantage over Mozilla is that Chrome ships with a version of Flash built-in to the browser which means that the most popular NPAPI plugin is still available in Chrome, albeit in a different form.
...
Up until now, Mozilla stated that support for NPAPI would end at the end of 2016 but did not reveal exactly when it would happen.
A post on Mozilla.dev.tech.plugins in February revealed updated plans. According to the information posted there, Mozilla plans to remove NPAPI support in Firefox 53 which will be out in April 2017.
The next Firefox ESR (Extended Support Release) version is 52 and will receive security updates for a year. By removing NPAPI in Firefox 53, the release after the ESR, users that need NPAPI support can continue to switch to Firefox ESR 52 and keep using NPAPI plugins until May 2018.
The main reason why Firefox 53 is picked is that Firefox 52 is a new ESR release. This means that anyone on ESR will be able to use NPAPI plugins until that version is no longer used and that is not before May 2018.
https://java.com/en/download/help/firefox_java.xml
https://support.mozilla.org/en-US/questions/975269
http://news.softpedia.com/news/flash-npapi-support-to-be-removed-in-firefox-53-503777.shtml
Related
I have JRE 8u211 installed on a Windows 10 box with IE 11. I can see the Java plugin (and plugin 2) are installed and enabled. I have the "Allow active content to run in files on my computer" option checked under Security. But I cannot get a Java applet to load. Every time the page loads, I get the "The page you are viewing uses Java" notification as if the browser thinks I don't have Java installed.
What am I missing?
Figured it out. I'd forgotten that IE traditionally doesn't seem to like x64 Java installs very much. Once I dropped a 32 bit version, everything worked.
In the perfect dream world where all software development makes use of current and best practices, applets might be dead. But in the actual world of legacy support, they are (unfortunately) still alive.
I second the comment by Elliot Fischer... However, there is still quite a lot of Hardware that is still being supported, or even potentially manufactured (sold for sure) that can only function with these Java applets.
I had this problem with my Motorola FX7400. Of course Motorola says it's "Service & Support Discontinuation Date" is 30.8.2019. Of course the latest firmware is from 2015 and doesn't have a hint of any type of certificate or signing of java applets!
For most applets that have not been updated since the very latest Java Security settings were upgraded in around 2013-2015 and which most likely are also only 32-bit and have no signing of any sort on them; Do the following steps. Of course, even I CANNOT RECOMMEND THIS METHOD AT ALL FOR APPLICATIONS RUN FROM THE INTERNET Also, you should take precautions when trying to use Java like this on Hardware you are not familiar with.
The steps that are required for Windows 7, 8.1 & 10 with Internet Explorer 11 are as follows:
Download and install latest JRE SE 32bit from here: https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html (And yes, you need to give out your private data including address and phone number. You also need to pay for a license, if you are not a developer or a private user)
Start Internet Explorer 11 (64 bit seems to work fine)
Ensure ActiveX filtering is disabled Tools -> ActiveX filtering On my install disabling this was only necessary to be able to run the Java test from the "alternate page", which is marked "IE 11 users:": https://www.java.com/en/download/installed.jsp
Check that the Java plugin is enabled Tools -> Manage Add-ons
Check that your security zone has Scripting of Java applets enabled. On my IE11 it was enabled by default even for the Internet-zone set to Medium-High with protected mode on Tools -> Internet Options -> Security -> (select your appropriate zone) -> Custom level -> Scripting of Java applets
If the applet that needs to run is not properly signed (very likely...), it is required to set every single URL where an applet is run in to the exceptions. (As of writing this answer, at least wildcars for paths are working.)
When running the applet, accept the security exception prompts that Java prompts for.
And finally! For some reason there will at some point when loading an applet that previously loaded fine be a prompt about not being able to run the applet, because only applications that meet the very high security settings (signed applets) can be run. To get back to running again, Java's temporary files need to be removed. Restoring security prompts has no effect. Start Menu -> Configure Java -> General tab -> Temporary Internet Files -> Settings... -> Delete Files -> OK C:\Users\%username%\AppData\LocalLow\Sun\Java\Deployment\Cache -directory probably also works.
Security and prompts really have come far in the past 10 years, haven't they?
I jumped here searching for an answer that I found elsewhere and I would like to share.
According to my experience the problems of IEx64 with jre x64 are due to the fact that internet explorer tabs are 32 bit processes, so they work only if they find a 32 bit jre. There is a registry key to force IEx64 to open x64 tabs:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main
Dword TabProcGrowth set to 0
I heard it is considered a security flaw, but it can be accepted if IE is used only with well known legacy web applications.
About IEx64
In the folder
\Program Files (x86)\Internet Explorer
there is the 32 bit version and when you open a page in IEx64 it is actually displayed by an new instance of IEx86. You can check this using task manager, going on detail tab and looking at the application path.
I have a selenium (v2.53) test that visits a site containing flash player (I'm testing this player). up until now, everything was working fine, but after I updated chrome to v62, flash is disabled by default.
I can't change manually flash setting since this test is automated and running on remote machines.
I've tried adding some chrome capabilities that should work on previous versions of chrome, but it did not work on chrome 62 version since allowing flash is not enough, now a list of allowed site is also required.
How can I change both the enabled status and the list of sites using selenium?
Also, is there a way to install chrome with a config file that both enables flash and populates the required sites list?
Thanks.
P.S. I'm working with Java 8
Your best bet is to simply use Chrome options. Why do you need a config file? That sounds overly complicated and unnecessary. You can enable it through chrome preferences. Try a fresh install of Chrome too.
Something akin to the likes of:
chromeOptions:{
args: ["--allow-running-insecure-content", "--allow-insecure-websocket-from-https-origin", "allow-outdated-plugins"]
You didn't specify which language so I can't give you a language example.
Here is what I have:
Windows 10 Premium 64bit
Firefox 50.0.1
Java 1.8.0-u111/112
Now here is the problem:
I am using Firefox 50.0.1 it says I am using Chrome,
so I cannot verify my Java installation and I'm all out of ideas.
Any ideas would be great.
From the official Mozilla blog they wrote a post about this here:
Mozilla intends to remove support for most NPAPI plugins in Firefox by the end of 2016.
So it seems that as we are approaching the "end of 2016", they have removed support for NPAPI and as JohnnyAW already commented, applets are outdated and are already starting to be deprecated for the most part. Browsers are moving towards HTML5 and other technologies to completely replace the use of Java Applets, Flash and other plugins as such.
From bugzilla, there has been an update to this issue 2 days ago, outlined here.
There is also this resource explaining that all plugin support other than flash has been dropped.
We are trying to download something from GE that uses Java to download when logging into the site. This is a windows 7 Professional PC. I have other computers that are able to do this successfully. Here is my order of operations:
Log into the site and select the file I want to download
Click download
It takes me to the page that says it will start in a few seconds but nothing happens. It is supposed to have a box that asks for Java to run.
I have reinstalled Java fresh and still nothing. Tried with multiple user accounts. Added the site to the list of exceptions in the firewalls and Java configuration. I have tried an earlier version of Java. This happens in Mozilla, Chrome and IE. I have made sure that the Java plugin shows up and is enabled. I just cant think of what I am missing. And since we are a contractor GE is not going to help us. Can anyone here think of anything?
Are you sure you have the Java plugin enabled? e.g. in Firefox, go to Settings, Plugins, and change Java Platform SE8 'Next Generation Java Plugin' to 'always activate'?
This sounds similar to the issues I had with Cisco WebVPN, Java-style. Once you have Java installed correctly and set as a plugin for any of the browsers you would like to use, see below.
Before you even start looking at browsers - if you think it is already set up correctly
Look at your Anti-Virus programs or anything else that could prevent it from working. McAfee Host Intrusion Protection is known to cause many Java programs to fail. Kapersky had issues, a while back, with Java on Windows (Java Applets not loading in Windows 8 ).
You must have a 64-bit browser to use 64-bit Java (also mentioned in the Chrome link below).
See below for any specific things that can be modified in the browser.
Chrome 43 is the more complicated browser to set up. They have a dedicated page with instructions.
How do I use Java with the Google Chrome browser?
Firefox 38 will prompt you.
In Internet Explorer 11, it's under Internet Options->Security. I recommend adding the hostname the applet is on as a Trusted Site (Select Trusted Sites and click the Sites button, then add the first part of the url). Click the Custom level button and make sure that Scripting of Java applets is not disabled.
If you still have problems with the applet:
Verify your Java version will work with the applet you are accessing
Verify the plugin is enabled for the browser through the Java Control Panel, which is available in Windows Control Panel, or on Mac/Linux, execute it from the JDK directory ($JAVA_HOME/ControlPanel ).
I ended up fixing the issue. I had to allow their UK site on the list for Java and enable the SSL 2.0 for HTTP in Java config as well
I use Java applets in my application, today I surprisingly saw the redirect from my page and the next message from java
In details I've read about Chrome dropping 'NPAPI' support
Recently, Google has revised their plans and now state that they plan
to completely remove NPAPI by late 2015. As it is unclear if these
dates will be further extended or not, we strongly recommend Java
users consider alternatives to Chrome as soon as possible. Instead, we
recommend Firefox, Internet Explorer and Safari as longer-term
options. As of April 2015, starting with Chrome Version 42, Google has
added an additional step to configuring NPAPI based plugins like Java
to run — see the section Enabling NPAPI in Chrome Version 42 and later
below.
So will it be handled by Java somehow or it is the death of my applet in the next year ?
As of Chrome Version 42, an additional configuration step is required to continue using NPAPI plugins.
In your URL bar, enter:
chrome://flags/#enable-npapi
Click the Enable link for the Enable NPAPI configuration option.
Click the Relaunch button that now appears at the bottom of the configuration page.
So will it be handled by Java somehow ..
If they found a way, that would be a bug in Chrome (that would quickly be fixed).
..or it is the death of my applet in the next year ?
Yep. Not that they were really that 'healthy' for a long time now.
Java applets are not dead. There are a lot of intranet web applications that use them, for instance, for digital signature with applet-javascript-web page interaction. Other option is migration to Firefox.
I saw a demonstration that A Plugin written in Pepper API (PPAPI) can launch an executable and communicate with it. Oracle says at here " This change does not affect Web Start applications, it only impacts applets." But the problem is that browser downloads jnlp file but doesn't launch it. User has to click that jnlp file (of course .jnlp file association should be OK).
I think Oracle write a plugin to launch Web Start application and communicate with it for sending cookie etc. If It is written Applets can convert to Web Start applications with less effort.