0

I'm using Java Deployment Script on my web application using this code.

<script src="https://www.java.com/js/deployJava.js"></script>
<script>
    var attributes = {
        code:'applet.class',  width:0, height:0,separate_jvm: false,id:'applet'} ;
    var parameters = {jnlp_href: 'jnlp.jnlp'} ;
    deployJava.runApplet(attributes, parameters, '1.7');
</script>

The issue occurs when I try to view this page on Mobile Browser.

deployJava.runapplet checks for current installed on the browser/System, but as mobile browsers don't have hava(ios and android) it redirects it to java install page, which also informs that there is not java available.

So the user is not able to view the page entirely.

I want some way to disable java check on mobile browsers.

1 Answer 1

1

I see you are using the deployJava.js file also known as the 'Deployment Toolkit Script'.

So you can simply use the getJREs() function provided by that script to check if there are installed JREs before calling the runApplet() function.

You can also use the Detect Mobile Browsers lib to check if the user is on a mobile browser

2
  • I would like to work normally on normal web browser, but disabled on mobile browsers. Is there a way I can check if the browser/platform is mobile? Commented Dec 9, 2013 at 9:24
  • @NikhilJain so... check the Detect Mobile Browsers lib Commented Dec 9, 2013 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.