Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

315
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda