Java applets in windows store apps - applet

I have a java applet and i'm developing a windows store app. I want to integrate my applet to this application. Is this feasible.. if yes... can you tell the process.
Thanks,
Harsha

You won't be able to run this within a Windows Store application since plug-ins (you'd need Java installed) are not allowed for WebView (or for the non-desktop version of IE 10 in general - Flash excepted for some sites).

It is not possible at the moment. When you were installing Java you must have missed the Java doesn't work in Metro.

You should probably be able to run your Java Applet into a WebView but I am not sure if that's a good practice or not. You should convert your java applet into a HTML5/JavaScript application or C# application for optimum performance.

Related

Adding a Groovy web console into eclipse(j2ee) and run it at apache tomcat

Is there anyone that has done a java interpreter using groovy-all jar file? Maybe sample or example can share it to me or teach me? I meant a interpreter that can parse string(java code) into the textarea and output it as a result like(hello world)
As you need some sample code to implement a web-console using groovy-all.jar, it would strongly recommend taking a look at Groovy Web Console.
Although it's not exactly a Java EE / Tomcat app and it is fairly similar as its a standard Java Servlets API 2.5 based web app. It runs on Google App Engine, which you can try out here. All you need from it is the script execution logic which for most of the part is not app engine specific. Keep in mind, it has dependencies on GAE Apis (through Gaelyk) so you should prune that part out of it to run in it outside Google App Engine.

Find Version of GWT Running On Site

Is it possible to send a javascript command to a site and determine the GWT version running in the browser? The reason I ask is because our QA folks are certifying our software and need a way to look at the version running without taking our word for it by looking at the IDE.
I know that I can do java -jar gwt-dev.jar, but normally we do not deploy that with the software.
The built-in GWT linkers generate a $gwt_version variable in the *.cache.* files.
Assuming you don't have other frames in your app, your GWT app will be in the first frame so you can then get the GWT version used to compile it with frames[0].$gwt_version.

Update java with java?

I was looking around and couldn't find this anywhere, but is there any way to update the JRE through a java application and then to restart said application using the new JRE?
Updating the JRE from within a running Java app. is not something that is commonly done.
Instead look to deployJava.js for ensuring a particular major version of Java is installed, and Java Web Start for ensuring a particular micro-version is available.
These technologies are both related to launching rich clients (applets and desktop apps.) so if the app. has a GUI as mentioned here it should be 'all systems go'.

Web framework with user-friendly desktop deployment?

I'm building a web app with Backbone.js (I'm not tied to Backbone yet though). I need a back-end framework only for persistence to a database via a RESTful API. However, I also need to able to deploy it as a 'desktop' app for off-line use, i.e. running a local server and launching a browser window, but I don't want users to have to start a server from the command line to run the application.
I can use SQLite as a database since it's only a single user application, it's just the framework that I'm stuck on. I have looked at the following:
Rails and Django: Default web servers are too flimsy, requires Ruby/Python and runs from the command line. I'm aware of the Bitnami stacks but at 99mb it's too big of a dependency and not exactly hidden from the user.
Sproutcore: Run from command line, also too bulky.
Pyjamas Desktop - Depends on MSHTML which I suspect limits my ability to use HTML5 features.
I'm leaning towards creating a Java app that starts a Scala/Lift server instance and opens a web browser, then sits in the system tray (kind of like WAMP). Is anyone familiar with a tool or framework built for user-friendly deployment as a standalone desktop app?
I do not know if PHP is an option for you? Then I would recommend phpdock.
web2py has a standalone deploy-to-desktop feature with no dependency on Python: http://web2py.com/books/default/chapter/29/14#How-to-distribute-your-applications-as-binaries
As Eydun said, phpdock is an option but it's commercially licensed .
I settled on using Java/Spring/H2/Hibernate/Jetty. I find that Jetty serves requests VERY quickly so the application looks real-time when launched in a browser. There is a tutorial on embedding the Jetty server here. I imagine it's quite trivial to build a GUI that launches the server and a browser.
Another Java option is to use the Play Framework, which may be more at home to those coming from a Django/Rails background. However, the documentation for "creating a standalone version of your application" for Play 2.0+ indicates that they have ditched using Java EE containers (Tomcat/Jetty) and WAR files in favor of running the JARs with the bundled copy of JBoss Netty, so it may take a bit of work to get it running the way you want it.
I would recommend the Play Framework approach if you're OK with using/learning Scala.

How to tell if a Java application was started by WebStart

Our app has 3 ways to launch...
Applet in a web-page
Desktop application
WebStart
WebStart currently launches the applet but we prefer it to launch the desktop class instead. However, the desktop version expects all resources to be there already whereas WebStart should download resources like an applet.
Specific code in each case is not the problem, but figuring out which way the app was launched is... we don't want to try downloading content for the full desktop application.
Some ideas:
Set a property in the JNLP files to indicate it is JWS.
Do a try/catch on loading one of the JNLP API classes. They will not be on the run-time class-path of the 'naked' desk-top app., but will for the apps. launched by JWS. Some examples of loading the JNLP API classes can be seen in these demos.