Open GoogleCodeExporter opened 9 years ago
The problem is that in a NetBeans module environment getJcefLibPath() in
CefApp.java cannot determine the path of jcef.dll so the whole
java.library.path is passed instead to the N_Initialize() method as the
pathToJavaDLL parameter. This causes the settings.browser_subprocess_path in
CefApp.cpp to not be set to the correct path of jcef_helper.exe, and the
child_process_launcher in cef cannot start jcef_helper.exe.
getJcefLibPath() tries to find jcef.dll in the original java.library.path. In
this case NetBeans uses a custom ClassLoader for our module which is also used
when loading jcef.dll in CefApp. This custom ClassLoader overrides the
FindLibrary protected method of ClassLoader so that it can load native
libraries from e.g.
D:\projects\netbeans-modules\webgl-view\target\nbm\netbeans\extra\modules\lib\x8
6. Therefore, jcef.dll might not be found in the folders of java.library.path
by getJcefLibPath().
I attached a patch with a solution which uses the protected FindLibrary method
of the custom classloader to determine the path of jcef.dll. Though it uses
reflection to call the protected method I think it's more robust than the
current method.
Please merge the fix if you agree with it. I tested it on Win32. Thanks!
Original comment by janos.br...@gmail.com
on 20 Oct 2014 at 11:16
Attachments:
JCEF version: rev 105
CEF version: 3.1916.1749 win32
OS version: Windows 7
NetBeans version: 8.0.1
Original comment by janos.br...@gmail.com
on 20 Oct 2014 at 11:28
settings the VM options worked for me...
Original comment by manslogic@gmail.com
on 6 Nov 2014 at 9:22
Attachments:
I think your screenshot shows the settings of a plain Netbeans Java *project*
not a Netbeans *module project*. Maybe the original description was not clear
enough but what does not work for me is a *module project*. I want to embed
jcef in the Netbeans IDE itself to have WebGL support in Netbeans (see
screenshot which uses my patched version of jcef).
Original comment by janos.br...@gmail.com
on 6 Nov 2014 at 10:10
Attachments:
I try to give a more exact description to reproduce the problem so that you can
verify that my patch works.
1. Open the chromium-embedded2 project from the attached zip file in Netbeans.
This is a Maven project of a very simple Netbeans module using jcef.
2. Install the jcef jar dependencies manually to the local Maven repo from
within Netbeans, see screenshots 2 & 3.
3. Copy native dependencies from jcef\src\binary_distrib\win32\bin\lib\win32\*.*
to the folder under the new project chromium-embedded2\release\modules\lib\x86\
(see screenshot).
4. Build chromium-embedded2 in Netbeans
5. Run chromium-embedded2 from Netbeans
6. Observe the log output in Netbeans. Without the patch the log is the
following for me:
...
initialize on Thread[AWT-EventQueue-0,6,main] with library path D:\Program
Files (x86)\NetBeans
8.0.1\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:\Program
Files (x86)\ActiveState Komodo Edit
8\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\W
indowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web
Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance
Toolkit\;C:\Program Files
(x86)\play-1.2.3;C:\Python27;C:\Python27\Scripts;C:\Program Files
(x86)\cwRsync\bin;C:\Program Files (x86)\Microsoft SQL
Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\100\DTS\Binn\;C:\Program Files (x86)\apache-maven\bin;C:\Program
Files\Microsoft\Web Platform Installer\;C:\Program Files
(x86)\QuickTime\QTSystem\;C:\Program Files\doxygen\bin;C:\Program Files
(x86)\Java\jdk1.7.0_55\jre\bin;C:\Program Files
(x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\OpenVPN\bin;C:\Program
Files\TortoiseSVN\bin;D:\depot_tools;C:\Program Files
(x86)\Java\jdk1.7.0_55\bin;C:\Program Files
(x86)\ProTrader\Common;C:\Chocolatey\bin;C:\Program Files (x86)\Git\cmd;;.
[1021/002156:ERROR:child_process_launcher.cc(328)] Failed to launch child
process
[1021/002157:ERROR:child_process_launcher.cc(328)] Failed to launch child
process
I hope this helps.
Original comment by janos.br...@gmail.com
on 6 Nov 2014 at 10:57
Attachments:
JCEF is transitioning from Google Code to Bitbucket project hosting. If you
would like to continue receiving notifications on this issue please add
yourself as a Watcher at the new location:
https://bitbucket.org/chromiumembedded/java-cef/issue/128
Original comment by magreenb...@gmail.com
on 18 Mar 2015 at 6:00
Original issue reported on code.google.com by
janos.br...@gmail.com
on 20 Oct 2014 at 10:41