locked
Can I reuse my Java application built for desktop in Windows 8 app which runs on a tablet and Windows 8 PC?

    Question

  • Hi,

    I have a desktop based java application which runs on Windows and Mac. The UI and Logic of that is well differentiated. Can I reuse the logic part(which will be a jar) and build the UI in an Windows 8 metro app ? Is it possible to talk to the Java layer ?

    In My Java app, I create an exe which bundles runtime(JRE) also to execute the Jar.

    I am new to Windows development and want to understand if I can create a bridge between this two layer.

    Any help/suggestions will be hugely appreciated. 

    Regards,

    Subhankar

    Wednesday, June 11, 2014 2:54 AM

Answers

  • It'll fail certification. How the java engine works in the app package context will depend on what the engine does. It may or may not work side-loaded. For example: general logic may be ok, but file access is unlikely to work.

    It's not supported, but you can try it out to see what you can get away with.


    --Rob

    Wednesday, June 11, 2014 2:36 PM
    Owner
  • If you can host your Java logic in a web service, then a Windows Store App client can talk to it.  In a side-loaded application you can deploy your Java web service as a desktop application using an installer, and access it from a side-loaded store app.  In a published store app you would need to run your java web service externally, like in an Azure Web Site eg http://azure.microsoft.com/en-us/documentation/articles/web-sites-java-get-started/

    David


    David http://blogs.msdn.com/b/dbrowne/

    Wednesday, June 11, 2014 3:49 PM

All replies

  • Your Java implementation is probably not valid for Windows Store apps and so couldn't be used. You would need to port the Java layer to C# or another language which supports Windows Store app programming -- C# is probably the closest to Java and would be the easiest port.

    It would be theoretically possible for somebody to write a Java implementation that was valid for Windows Store apps, but I do not believe anybody has done so.

    --Rob

    Wednesday, June 11, 2014 3:58 AM
    Owner
  • Hi Rob,

    Thanks for your quick response. Do you mean that I cannot publish that app in the app store ?

    What if I don't want to publish it in app store but still want to create an app which uses Java implementation that I have. It will be a stopgap solution I understand but I want to know if that is possible and if yes then how.

    Subhankar

    Wednesday, June 11, 2014 4:52 AM
  • It'll fail certification. How the java engine works in the app package context will depend on what the engine does. It may or may not work side-loaded. For example: general logic may be ok, but file access is unlikely to work.

    It's not supported, but you can try it out to see what you can get away with.


    --Rob

    Wednesday, June 11, 2014 2:36 PM
    Owner
  • If you can host your Java logic in a web service, then a Windows Store App client can talk to it.  In a side-loaded application you can deploy your Java web service as a desktop application using an installer, and access it from a side-loaded store app.  In a published store app you would need to run your java web service externally, like in an Azure Web Site eg http://azure.microsoft.com/en-us/documentation/articles/web-sites-java-get-started/

    David


    David http://blogs.msdn.com/b/dbrowne/

    Wednesday, June 11, 2014 3:49 PM