Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

314
Views
Resizing IE11 using Java

I have an issue with trying to resizing IE11 in kiosk mode but launching in kiosk mode would force it to go fullscreen but if I turn off kiosk mode, the toolbar & navbar, etc. will all be visible which is not what I want to prevent user from editing the url, so I would I be able to achieve that? I tried using JS, but it didnt work. Is it possible to do it without using JS?

I tried Process p = new ProcessBuilder("cmd.exe", "/c", "start iexplore -k javascript:resizeTo(400,300)\"" + newUrl +"\"").inheritIO().start(); , but it prompt save file dialog, instead of resizing.

Tried this too javascript:moveTo(0,0);resizeTo(1024,768);}, cant find out what is wrong for that, since the console is disabled in kiosk mode.

Currently using java-8.


private static String newUrl = replaceUserID(url);

public static void main(String[] args) {
        try{
            Process p = new ProcessBuilder("cmd.exe", "/c", "start iexplore -k \"" + newUrl +"\"").inheritIO().start();
            resizeBrowser();
            try{    
                p.waitFor();
            }
            catch( InterruptedException ie ){
                System.out.println("InterruptedException " + ie.getMessage());
            }
            InputStream err = p.getErrorStream();
            int ctr = 0;
            if ( (ctr = err.available()) > 0 ){
                byte[] buf = new byte[ctr];
                System.out.println("Process failed with error:\n" + new String(buf, 0, ctr));
                }
            }
            catch(IOException ioe)
            {
                System.out.println("InterruptedException " + ioe.getMessage());
            }
    }

public static void resizeBrowser() {
        ScriptEngineManager scriptEngineManager = new ScriptEngineManager();
        ScriptEngine javaScript = scriptEngineManager.getEngineByName("nashorn");
        
        try {
            javaScript.eval("function resizeIE(){"
                    + "newWindow = window.open(\"" + newUrl +  "\", IEWindow, resizable);"
                    + "newWindow.resizeTo(500,400);}");
        }catch (ScriptException e) {
            e.printStackTrace();
        }
        }
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm afraid it's impossible to resize IE kiosk window. Kiosk mode means run browser in fullscreen window. You can't tell the browser to run in fullscreen and non-fullscreen window at the same time. That doesn't make any sense.

For similar thread, you can also refer to this link.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!