[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[tycho-user] Access restriction: The type WindowsLookAndFeel is not accessible due to restriction on classpath entry C:\Program Files\Java\jdk1.6.0_20\jre\lib\rt.jar
|
Compilation failure:
[ERROR] ...\mapping\MapView.java:[85,0]
[ERROR] import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
[ERROR] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] Access restriction: The type WindowsLookAndFeel is not
accessible due to restriction on classpath entry C:\Program
Files\Java\jdk1.6.0_20\jre\lib\rt.jar
>From the docs http://www.eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<compilerArgument>-warn:-forbidden</compilerArgument>
<fork>true</fork>
</configuration>
</plugin>
I should be able to pass arguments into the compiler via
compilerArgument, but only if fork is true.
But this gives me this error
[ERROR] Failed to execute goal
org.eclipse.tycho:tycho-compiler-plugin:0.14.1:compile
(default-compile) on project ...application: Fatal error compiling:
compileoutOfProcess not supported -> [Help 1]
The offending line is
UIManager.setLookAndFeel(WindowsLookAndFeel.class.getName());
Because there is an ESRI MapBean embedded in the application, which is
AWT component and needs to use an AWT/SWT bridge and to set the AWT
look and feel.
As a workaround, I've set the value to the .class.getName() string
representation
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
But what are the correct options?