Hello,

I'm in a process of writing a C++ application which needs to invoke methods on a Java application.

I'm using JNI and when I run my application, I can see that the object I created connects to the Java application.

However, I'm getting an error:-

Error - [The Microsoft Windows Look and Feel - com.sun.java.swing.plaf.windows.WindowsLookAndFeel] not supported on this platform

I looked online and found this tip:

http://www.devx.com/tips/Tip/20570

I also found another site which says if I'm not concerned which Look and Feel to use, I can run the application using: -

java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel <myApp>

However, it seems to me, you'd use that when you want to execute a Java program, not C++.

I mean: my executable is from C++ !

Can I add java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel to some environment variable so that when I create my JVM (in my C++ program), Java will be called with this option ?

Other suggestions, suggestions are most welcome.

Many thanks,

Imanuel.