How do I enable large page support on Windows?

Solution Verified - Updated

Environment

  • Windows
  • Java JDK

Issue

  • Unable to start JBoss and getting below logs:
Java HotSpot(TM) 64-Bit Server VM warning: JVM cannot use large page memory because it does not have enough privilege to lock pages in memory.
java.lang.NoClassDefFoundError: 922
Caused by: java.lang.ClassNotFoundException: 922
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: 922.  Program will exit.
Exception in thread "main" Shutdown JBoss EAP 5 (JVM1) service

Resolution

  • Large pages are only supported on Windows Server 2003/2008.

  • The user running Java must have the following additional privileges assigned:

    1. Select Control Panel -> Administrative Tools -> Local Security Policy
    2. Select Local Policies -> User Rights Assignment
    3. Double click "Lock pages in memory"
    4. Add users and/or groups
    5. Reboot the machine
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.