With PhoneGap (Phonegap.com) You can create applications in HTML5 and run as a application on Android, Blackberry etc. Now with Android you make a code in HTML5 and compile it into a APK. Now my question is can i do the exact same like on android but then pack it into a JAR (Dont really need to have the PhoneGap engine, it just need to run HTML5 offline while the files are packed in the JAR)
Thanks!
HTML5 runs in the context of a web browser. Java runs in the context of a JVM (or an “almost JVM” in android’s case).
In other words, these are two different technologies, and as such you might be able to accomplish similar tasks with both, but the means you will need to take to do so will differ greatly.
If you want one to leverage the other, you need to decide which one is being leveraged, and which one is doing the leveraging. For example, it is possible to emit HTML5 from a Java servlet, as it is possible for a HTML5 web page to include a Java applet; however, the interfaces to both are rigidly defined, and discussion about them is best served after you have decided on a larger application architecture.