<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.snail</groupId>
<artifactId>GrappaExam</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>GrappaExam</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>junit:junit</exclude>
<exclude>javax.servlet:servlet-api</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>att</groupId>
<artifactId>grappa</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>swing-layout</artifactId>
<version>1.0.3</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>eulergui.sourceforge.net</id>
<name>Euler GUI Maven 2 Repository</name>
<url>http://eulergui.sourceforge.net/maven2/</url>
</repository>
</repositories>
</project>
$ gcj GrappaExam-1.0-SNAPSHOT.jar --main=com.snail.grappaexam.GrappaForm -o GrappaExam $ ./GrappaExam
$ ps -af UID PID PPID C STIME TTY TIME CMD kagyuu 23947 22716 4 20:33 pts/0 00:00:05 ./GrappaExam kagyuu 24059 23980 2 20:35 pts/1 00:00:00 ps -af
何の問題もなくネイティブアプリとして動いている。いい子
$ sudo port install gcc46
$ gcj-mp-4.4 GrappaExam-1.0-SNAPSHOT.jar --main=com.snail.grappaexam.GrappaForm -o GrappaExam $ ./GrappaExam dyld: _dyld_bind_fully_image_containing_address() error dyld: Symbol not found: _libiconv Referenced from: /opt/local/lib/gcc44/libgcj.10.dylib Expected in: flat namespace in /opt/local/lib/gcc44/libgcj.10.dylib Trace/BPT trap
$ sudo port install libiconv $ gcj-mp-4.4 GrappaExam-1.0-SNAPSHOT.jar --main=com.snail.grappaexam.GrappaForm -o GrappaExam $ ./GrappaExam dyld: _dyld_bind_fully_image_containing_address() error dyld: Symbol not found: _libiconv Referenced from: /opt/local/lib/gcc44/libgcj.10.dylib Expected in: flat namespace in /opt/local/lib/gcc44/libgcj.10.dylib Trace/BPT trap
$ gcj-mp-4.4 GrappaExam-1.0-SNAPSHOT.jar --main=com.snail.grappaexam.GrappaForm -o GrappaExam -L/opt/local/lib -L/opt/local/lib/gcc46
$ ./GrappaExam Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: at java.lang.Throwable.<init>(libgcj.10.dylib) at java.lang.Exception.<init>(libgcj.10.dylib) at java.awt.Toolkit.getDefaultToolkit(libgcj.10.dylib) at java.awt.EventQueue.invokeLater(libgcj.10.dylib) at com.snail.grappaexam.GrappaForm.main(GrappaExam) Caused by: java.lang.ClassNotFoundException: at java.lang.Class.forName(libgcj.10.dylib) ...3 more