# port fop-2.3 compile error



## nedry (Jun 12, 2019)

Hi, I am trying to compile: textproc/fop but I get the following error message:

```
root@bsdbox:/usr/ports/textproc/fop # make install clean
===>  License APACHE20 accepted by the user
===>   fop-2.3 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by fop-2.3 for building
===>  Extracting for fop-2.3
=> SHA256 Checksum OK for fop-2.3-src.tar.gz.
=> SHA256 Checksum OK for offo-hyphenation.zip.
===>   fop-2.3 depends on file: /usr/local/bin/unzip - found
Archive:  /usr/ports/distfiles/offo-hyphenation.zip
   creating: offo-hyphenation/
   creating: offo-hyphenation/images/
  inflating: offo-hyphenation/images/project.png
   creating: offo-hyphenation/hyph/
  inflating: offo-hyphenation/hyph/cs.xml
  inflating: offo-hyphenation/hyph/pl.xml
  inflating: offo-hyphenation/hyph/de_CH.xml
  inflating: offo-hyphenation/hyph/ru.xml
  inflating: offo-hyphenation/hyph/pt.xml
  inflating: offo-hyphenation/hyph/te.xml
  inflating: offo-hyphenation/hyph/da.xml
  inflating: offo-hyphenation/hyph/kn.xml
  inflating: offo-hyphenation/hyph/cop.xml
  inflating: offo-hyphenation/hyph/mn.xml
  inflating: offo-hyphenation/hyph/ka.xml
  inflating: offo-hyphenation/hyph/bg.xml
  inflating: offo-hyphenation/hyph/el.xml
  inflating: offo-hyphenation/hyph/hi.xml
  inflating: offo-hyphenation/hyph/oc.xml
  inflating: offo-hyphenation/hyph/is.xml
  inflating: offo-hyphenation/hyph/sr_Latn.xml
  inflating: offo-hyphenation/hyph/it.xml
  inflating: offo-hyphenation/hyph/lt.xml
  inflating: offo-hyphenation/hyph/ga.xml
  inflating: offo-hyphenation/hyph/eo.xml
  inflating: offo-hyphenation/hyph/af.xml
  inflating: offo-hyphenation/hyph/mr.xml
  inflating: offo-hyphenation/hyph/tk.xml
  inflating: offo-hyphenation/hyph/zh_Latn.xml
  inflating: offo-hyphenation/hyph/fi.xml
  inflating: offo-hyphenation/hyph/gu.xml
  inflating: offo-hyphenation/hyph/ca.xml
  inflating: offo-hyphenation/hyph/lv.xml
  inflating: offo-hyphenation/hyph/grc.xml
  inflating: offo-hyphenation/hyph/fr.xml
  inflating: offo-hyphenation/hyph/pa.xml
  inflating: offo-hyphenation/hyph/de_1901.xml
  inflating: offo-hyphenation/hyph/sv.xml
  inflating: offo-hyphenation/hyph/gl.xml
  inflating: offo-hyphenation/hyph/nb.xml
  inflating: offo-hyphenation/hyph/ro.xml
  inflating: offo-hyphenation/hyph/en.xml
  inflating: offo-hyphenation/hyph/sr_Cyrl.xml
  inflating: offo-hyphenation/hyph/cy.xml
  inflating: offo-hyphenation/hyph/rm.xml
  inflating: offo-hyphenation/hyph/sl.xml
  inflating: offo-hyphenation/hyph/ta.xml
  inflating: offo-hyphenation/hyph/et.xml
  inflating: offo-hyphenation/hyph/hr.xml
  inflating: offo-hyphenation/hyph/nn.xml
  inflating: offo-hyphenation/hyph/th.xml
  inflating: offo-hyphenation/hyph/id.xml
  inflating: offo-hyphenation/hyph/bn.xml
  inflating: offo-hyphenation/hyph/es.xml
  inflating: offo-hyphenation/hyph/eu.xml
  inflating: offo-hyphenation/hyph/ml.xml
  inflating: offo-hyphenation/hyph/or.xml
  inflating: offo-hyphenation/hyph/hsb.xml
  inflating: offo-hyphenation/hyph/as.xml
  inflating: offo-hyphenation/hyph/fur.xml
  inflating: offo-hyphenation/hyph/el_Polyton.xml
  inflating: offo-hyphenation/hyph/mul_ET.xml
  inflating: offo-hyphenation/hyph/ia.xml
  inflating: offo-hyphenation/hyph/la.xml
  inflating: offo-hyphenation/hyph/tr.xml
  inflating: offo-hyphenation/hyph/pms.xml
  inflating: offo-hyphenation/hyph/hy.xml
  inflating: offo-hyphenation/hyph/en_GB.xml
  inflating: offo-hyphenation/hyph/la_CL.xml
  inflating: offo-hyphenation/hyph/uk.xml
  inflating: offo-hyphenation/hyph/de.xml
  inflating: offo-hyphenation/hyph/sk.xml
  inflating: offo-hyphenation/hyph/sa.xml
  inflating: offo-hyphenation/hyph/kmr.xml
  inflating: offo-hyphenation/hyph/nl.xml
  inflating: offo-hyphenation/languages-info.xml
  inflating: offo-hyphenation/languages-info.xsl
  inflating: offo-hyphenation/installation.html
  inflating: offo-hyphenation/index.html
   creating: offo-hyphenation/skin/
  inflating: offo-hyphenation/skin/forrest.css
  inflating: offo-hyphenation/skin/quirks.css
  inflating: offo-hyphenation/skin/tigris.js
  inflating: offo-hyphenation/skin/inst.css
  inflating: offo-hyphenation/skin/tigris.css
===>  Patching for fop-2.3
===>  Applying FreeBSD patches for fop-2.3
===>   fop-2.3 depends on file: /usr/local/openjdk7/bin/java - found
===>   fop-2.3 depends on file: /usr/local/bin/ant - found
===>  Configuring for fop-2.3
===>  Building for fop-2.3
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/textproc/fop
*** Error code 1

Stop.
make: stopped in /usr/ports/textproc/fop
root@bsdbox:/usr/ports/textproc/fop #
```
 Thanks, nedry


----------



## SirDice (Jun 12, 2019)

Seems pretty obvious:

```
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0
```
Your devel/apache-ant is not the correct version. It's that, or your Java version.


----------

