# Problem with bib2gls

In the "The glossaries package v4.46: a guide for beginner" on page 24 (from https://www.ctan.org/pkg/glossaries) it is stated:

Having the file myDoc.tex

\documentclass{article}
\usepackage[record]{glossaries-extra}
\GlsXtrLoadResources % input file created by bib2gls
[% instructions to bib2gls:
src={entries}, % terms defined in entries.bib
sort={en-GB}% sort according to this locale
]
\newglossaryentry{sample}{name={sample},
description={an example}}
\begin{document}
A \gls{sample}.
\printunsrtglossaries % iterate over all defined entries
\end{document}


and entries.bib:

@entry{sample,
name = {sample},
description = {an example}
}


and running

pdflatex myDoc
bib2gls myDoc
pdflatex myDoc


would result in a correct pdf file, but during the step:

bib2gls myDoc


I get:

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/dickimawbooks/bib2gls/Bib2Gls : Unsupported major.minor versi
on 52.0
at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)


So either I must do wrong or the instructions are incorrect, but what ?

• Your entries.bib looks bad. The field description needs an actual description as in description = {an example}. The @entry starts with { but after the corrected description field needs } to close the entry. After doing such corrections it worked fine in my computer May 17 at 12:28
• @LuisTurcio thanks for pointing that out, unfortunately it was just a copy / paste error to the question, in my original file the contents is (in my opinion) correct. Please see the updated question. May 17 at 13:21
• This seems like a Java version error, you need Java 1.8 or higher. See stackoverflow.com/questions/22489398/…. May 17 at 14:46
• @marijn Thanks might be the right call, I have 1.7.0_67 so it looks like I have to upgrade to a newer version, I have to see what I can do... May 17 at 15:44
• I installed the 1.8 version and it looks like this is solving the problem. @marijn maybe worth an answer. May 17 at 16:20

The bib2gls manual mentions the following on the first page:
The error message Unsupported major.minor version 52.0 is a check that the Java interpreter performs to see if the version set as a target during compilation (here 52.0) is compatible with the currently installed version of Java. 52 is Java 8 (also known as Java 1.8).