I have an internal web application and I want to be able to take a screenshot of the user's entire desktop environment through the app, not just the browser window. In my research, I've found that I could do this using a Java applet. However, Java applets are no longer supported in Chrome as of v45, and they tend to be slow and dated. I've explored the possibility of using flash or a browser extension, but it appears that I would only be able to capture the browser window through these means. I'd prefer not to use a native application, as the screen capture is to be a feature of the web app, so I'd like to keep them as tightly coupled as possible.
Specifically, are there any other methods that I am missing to achieve what I'd like to do? I've sort of resided myself to a java applet sans chrome support or a separate native app, but I've had trouble finding literature online about my use case (assumably due to the security concerns).
Related
I have an application which is composed of many JFrame objects (using Java and Netbeans). The 'main' frame has 4 buttons and each button opens another frame. Now my problem is that I want the whole application to be run on the web as a website.
I was considering 3 possible scenarios (from my research):
Use Java Web Start
Convert JFrame to JApplet
Create from scratch a Java web application
I was hoping that maybe someone can give me some help, and guidelines of which option I should opt for.
The quickest option is to modify your application to run as an applet (yes, this would involve making a JApplet from your JFrame). However, you should realize that the Java Applet is considered an outdated technology. Most mobile devices won't run them and even some popular desktop browsers won't (Mac Chrome). What's more, Oracle now requires all applets to be signed in order to run with default security settings. This means purchasing a yearly (~$200) signing certificate.
Java Web Start is not really fundamentally different from applets and will suffer the same issues as above.
Think again about your choice of technology. A Java web application (e.g., Spring MVC) or a JavaScript application (e.g., GWT, JQuery) are better choices.
For deploying Java desktop apps., the best option is usually to install the app. using Java Web Start. JWS works on Windows, OS X & Unix/Linux.
Applet deployment has always been difficult, with weird bugs in particular versions of specific JREs in conjunction with particular browsers. My 'favorite' bug happened in a version of Firefox that triggered an applet to reload when the user scrolled up in the web page.
See also The Use of Multiple JFrames, Good/Bad Practice?
i need to develop in java an application that accesses local resources, mainly a webcam, and possibly a wacom bamboo pen tablet. It should take pictures and notes and then post them to a web server.
The ways i can think of are:
use applets
use some kind of standalone app created via JavaFx (or swing or similar)
Which way would you go about it? Are applets considered a viable/secure way to achieve this?
Thanks
I would go the standalone app route. I always turn Java off in my browsers because I can never remember which specific version has security bugs.
If you build it as a desktop app I think you could quite easily convert it to be an applet later on if you wanted.
Can I run Java applications (Java Web Start) on iPad?
Looks like this is not possible, but someone suggested using Cloud Browse (an application I couldn't' find) to run Java.
Any solutions?
UPDATE: Cloud Browser is an application that was available on the App Store but it was removed my Apple. Cloud Browse would process the web site externally and then stream the web site content to your iPad screen (something like video streaming).
No, you cannot run Java programs on the iPad (or any iOS device). Apple's license terms forbid running applications that can execute code downloaded from the Internet (which is what Java Web Start is all about).
No, as staffan said, Webstart will not work. However using CloudBrowse, an applet can work. It looks like the idea behind Cloud Browse is that the browser gets rendered on the server and video of the web page get streamed to your phone. This way, it appears to the user that applets or flash are running on the ipad.
I tried CloudBrowse on my IPAD as I've got a Java Applet that runs inside a brower and wanted it to work on my Ipad.
I found that it works pretty well. The Java Applet has a 3D animation, it's not as smooth as running on Windows/Mac through a normal web-browser, but it's pretty good.
I paid for full version, wasn't that expensive and to me, worth it. Opens up the power of using Applets but within Ipad!
Check it out here ... 3D sailing replay.
I'm working on a large website project that makes heavy use of in-page graphing of data. To make the graphs interactive (the old paradigm was to post data to the server, have the server render the graph as a jpg, then send it back to the browser) we've started building the graphs in Java. It's a smooth system, but the website is still very much computer-dependent.
I'd like the site itself to work as a device-aware web application - switching layouts based on user agent strings to render a mobile-optimized version for cell phones and PDAs. But I'm concerned about the nebulous support for 3rd-party applets (Java, Flash, etc) when it comes to platforms like the iPhone.
So if you were building a web application that could be accessed either through a standard web browser or an iPhone/Blackberry/Palm device, what would you do to still display interactive graphs? Is there a workaround for using Java on the iPhone? Is there another platform we should pursue all together?
If you want to support more browsers, you may want to look at using Javascript to help decide what to do.
You could generate the graphs using the canvas element, and if the browsers doesn't support that element then you could use a Flash app, and if that doesn't work, have the graphs developed on the server and use the <img> tag and just refresh.
This third approach could also work if the browser doesn't have javascript enabled.
This way you can handle the various situations and get away from having to run Java in the browser.
The iPhone and Android browsers support HTML5 features such as "canvas", which you may want to look into. The browsers on BlackBerry phones are somewhat behind the times - they are finally releasing a WebKit-based browser for their upcoming 6.0 OS but all of the current in-market devices are quite limited in terms of browser capabilities. For those devices you're probably best off just using a static server-generated image.
I would use a JS charts library and gracefully downgrade to images when you detect an older browser.
I have seen a lot of people try to make a web ui looks like a desktop ui. However, most of the time i feel web ui is much more interesting than the desktop ui, with the help of javascript toolkit like jquery, gwt-ext etc.
My question is, how to port the web ui to desktop ui? Do I need to embed a javascript engine in java? css engine? html layout engine? That sounds like a lot of work to do.
Any easy way of doing this?
you can embed a web server in your app and you can embed a browser inside your app window. i know eclipse does this pretty well. it uses SWT to do the heavy lifting
http://www.eclipse.org/swt/snippets/#browser
check the Browser section
your web server doesnt even have to be a proper web server, it just has to set the content, and can query / change it on the fly. the javascript on the page can even interact directly with your app.
you should be even able to use crazy web frameworks like
http://echo.nextapp.com/site/
or
http://code.google.com/webtoolkit/
or even run a ruby site through JRUBY
or make really complex apps using the new HTML5 engine [canvas/video tags] (if your client has the new mozilla installed)
Adobe AIR technology solves this exact problem. The code you develop using Flex can be rendered in the Flash player plugin of a browser or the same code can be easily packaged as a Desktop application that runs on the AIR runtime.
Have you seen Appcelerator's Titanium Desktop
This is one of the best solution for you (i think!)
You write the javascript and html code, and the titanium SDK creates the Desktop application of the same
There is support for Python and Ruby.
Must try :
http://www.appcelerator.com/products/titanium-desktop/
if you are a Ruby programmer then you must also see this
http://www.rubyinside.com/bowline-rails-for-the-desktop-2183.html
Prism from Mozilla is made for this goal, exactly. It's out of beta now too, I believe.
Check Google Gears y Adobe AIR
It not 'a lot of work to do', it's a huge amount of work to do - you would in effect be writing you own browser and it'd never come close to the poplar ones out there, simply because you wouldn't get the level of feedback something like Firefox gets.
If you're trying to avoid address bars, menu bars, etc these can be switched off in all the popular browsers and so to the user the appearance would be that it's more application like with only the rich content of the HTML visible.
Sounds like JavaFX would be good for you?
http://en.wikipedia.org/wiki/Javafx
Try XULRunner from Mozilla. If you have developed extensions for Firefox, then this is the exact same thing. XULRunner contains the Gecko engine, so it can render XUL and HTML with CSS, and it supports JavaScript with many useful XUL Components, like file read and write, directory browser and network tools.
Because it supports HTML you can in effect make a webpage and have it run like an application. Also it is cross platform, so it will run on Windows, Mac and Linux, anywhere Firefox runs actually.
There is some information on creating XULRunner applications on the net, but since it's so similar to making Firefox Extensions, you can just google for that. A good Tutorial for getting started is this one.