jcef.dll: %1 is not a valid Win32 application

Having problems with building or using the JCEF Java binding? Ask your questions here.

jcef.dll: %1 is not a valid Win32 application

Postby NobleW » Tue Apr 14, 2015 10:08 am

Hello,
I'm trying to run just the MainFrame demo that comes with the JCEF 3.1750.1738.91_windows64 distribution; however I'm running into an issue saying something about an invalid Win32 Application. I'm running with Windows 7 EnterpriseSP1 64 bit with JDK 1.7u40

I've also tried creating an eclipse project to compile and run, but get the same issue.

If anyone has any help to get this to compile and run, I'd be grateful.

Code: Select all
C:\Users\nwillis\Desktop\rce\jcef_binary_3.1750.1738.91_windows64>compile.bat

C:\Users\nwillis\Desktop\rce\jcef_binary_3.1750.1738.91_windows64>"C:\Program Files\Java\jdk1.7.0_40\bin\javac" -cp "./bin;./bin/*" ./bin/tests/detailed/*.java ./bin/tests/detailed
/dialog/*.java ./bin/tests/detailed/handler/*.java ./bin/tests/detailed/ui/*.java ./bin/tests/simple/*.java

C:\Users\nwillis\Desktop\rce\jcef_binary_3.1750.1738.91_windows64>cd bin

C:\Users\nwillis\Desktop\rce\jcef_binary_3.1750.1738.91_windows64\bin>"C:\Program Files\Java\jdk1.7.0_40\bin\jar" -cf jcef-tests.jar tests/detailed/*.class tests/detailed/dialog/*.
class tests/detailed/handler/*.class tests/detailed/ui/*.class tests/simple/*.java

C:\Users\nwillis\Desktop\rce\jcef_binary_3.1750.1738.91_windows64\bin>cd ..

C:\Users\nwillis\Desktop\rce\jcef_binary_3.1750.1738.91_windows64>run.bat

C:\Users\nwillis\Desktop\rce\jcef_binary_3.1750.1738.91_windows64>"C:\Program Files\Java\jdk1.7.0_40\bin\java" -cp "./bin;./bin/*" -Djava.library.path=./bin/lib/win64 tests.detaile
d.MainFrame
Offscreen rendering disabled
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\nwillis\Desktop\rce\jcef_binary_3.1750.1738.91_windows64\bin\lib\win64\jcef.dll: %1 is not a valid Win32 applica
tion
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1957)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1882)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
        at java.lang.Runtime.loadLibrary0(Runtime.java:849)
        at java.lang.System.loadLibrary(System.java:1087)
        at org.cef.CefApp.<init>(CefApp.java:54)
        at org.cef.CefApp.getInstance(CefApp.java:75)
        at tests.detailed.MainFrame.<init>(MainFrame.java:103)
        at tests.detailed.MainFrame.main(MainFrame.java:70)

C:\Users\nwillis\Desktop\rce\jcef_binary_3.1750.1738.91_windows64>


Thanks,
Noble W
NobleW
Newbie
 
Posts: 4
Joined: Tue Apr 14, 2015 9:56 am

Re: jcef.dll: %1 is not a valid Win32 application

Postby NobleW » Tue Apr 14, 2015 4:06 pm

Well, turns out, I needed to add the Java JRE bin to my PATH, not just my Java JDK bin.

On that note, how will I be able to run my application on other machines? Will each machine need to configure their PATH to point to the Java JRE?
NobleW
Newbie
 
Posts: 4
Joined: Tue Apr 14, 2015 9:56 am

Re: jcef.dll: %1 is not a valid Win32 application

Postby magreenblatt » Tue Apr 14, 2015 4:21 pm

NobleW wrote:Will each machine need to configure their PATH to point to the Java JRE?

Yes, that's generally a requirement for Java applications. Or you can create a bootstrap script/exe that locates the Java install on the system.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to JCEF Forum

Who is online

Users browsing this forum: Google [Bot] and 46 guests

cron