0

I am trying to use gcj on hadoop-mapreduce-examples-2.7.1.jar to generate native machine code from the jar file. I need this for my research. But I am getting error: expected type 'java.lang.Throwable' but stack contains 'java.io.IOException'

I have gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) and the command I used is to do this is:

gcj --classpath={hadoop-mapreduce-client-core-2.7.1.jar:hadoop-common-2.7.1.jar:commons-cli-1.2.jar:commons-logging-1.1.3.jar:guava-11.0.2.jar:hsqldb-2.0.0.jar} -d {destination} hadoop-mapreduce-examples-2.7.1.jar

Since I am beginner with java, I am not sure if I am on the right path or not. I am not even sure if this is possible. Please suggest.

1 Answers1

0

Does adding -findirect-dispatch flag works for you?

Notice you can also add -O1, -O2 or -O3 optimization flag. In my case, -O1 actually works best, but you have to test for yourself.

Alex Vong
  • 483
  • 4
  • 15