# Listings package and BigInteger Library Conflict?

In my java code, I have extensively used the variables and methods from the BigInteger library. In LaTeX, in order to display my code neatly, I have used listings package. So between the \begin{lstlisting} and \end{lstlisting} I paste the aforementioned java code. But I am not able to compile it in TexStudio because anywhere I've used the methods from the BigInteger library, i get an error.

However, if I have a java code that doesn't use the BigInteger library, it gets compiled properly in TexStudio without any errors.

I have TexStudio for creating my LaTeX documents. Is there anyway to circumvent this issue?

-
 (La)TeX-related questions are better asked at TeX - LaTeX. Your question has been flagged so that it gets migrated there. – Alexis Pigeon Oct 18 '12 at 7:35 Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. Can you also add a small example of code that gives the error? – egreg Oct 18 '12 at 10:56

## migrated from stackoverflow.comOct 18 '12 at 8:45

Either use BigInteger with full package name i.e. java.math.BigInteger or add an import statement as import java.math.BigInteger; in the import section(top) of your file..