Provides an opportunity to view and/or modify command-line arguments before processing by CEF and Chromium.
So I overrid this function and added it via:
- Code: Select all
CefApp.addAppHandler(....)
First I tried to check what arguments it had, but I got an Exception at the following line:
- Code: Select all
Vector<String> args = command_line.getArguments();
- Code: Select all
java.lang.NoSuchMethodError: add
at org.cef.callback.CefCommandLine_N.N_getArguments(Native Method)
at org.cef.callback.CefCommandLine_N.getArguments(CefCommandLine_N.java:110)
at javaceftest.SimpleMainFrame$1.onBeforeCommandLineProcessing(SimpleMainFrame.java:84) //the line of code shown above
at org.cef.CefApp.N_Initialize(Native Method)
at org.cef.CefApp.access$600(CefApp.java:27)
at org.cef.CefApp$4.run(CefApp.java:430)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
My goal: to override the --disable-extensions switch to be able to use the built-in pdf viewer. Can I accomplish it through onBeforeCommandLineProcessing or do we have to recompile jcef?
I was unable to find the --disable-extensions switch in the CefCommandLine and the only modifications that seemed available was the reset() function.
Thank you,
János