Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I pass enum values to a function when using J/Link? What is the correct syntax for typing an enum value?

For example, call normalize() using NFC from here.

share|improve this question
up vote 9 down vote accepted

Enumeration value names are accessible using LoadJavaClass to load the enum class. However, this particular case is complicated by the fact that the enum class Form is an inner member of the class Normalizer. To load it, we must reference Form by its so-called binary name:


Now we can reference the enum values directly in a call to Normalizer.normalize():


  MakeJavaObject@FromCharacterCode[{65, 769}],
  Normalizer$Form`NFC] // ToCharacterCode

(* {193} *)
share|improve this answer
+1. Good to see you around :). – Leonid Shifrin Apr 5 '13 at 8:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.