1

I recently bought an Epson TM-T20II thermal receipt printer for a POS application I'm developing. Whenever I try to install the JavaPOS ADK from the Epson site (Or the included software cd, for that matter) I get Windows error 2 occured while loading the Java VM.

I tried following this answer but that leaves me with another error: ZeroGr2: Windows DLL failed to load

another error :(

I am running Windows 10 Pro x64 and have installed the anniversary update.

Any help on resolving this error and getting the installation to complete would be very much appreciated.

Community
  • 1
  • 1
Cas
  • 758
  • 14
  • 36

2 Answers2

2

To prevent the Windows error 2 code, start the .exe from the command prompt(as admin) and add a paramater LAX_VM, so something like

> Epson_JavaPOS_ADK_1141.exe LAX_VM "C:\Java\jre\bin\java.exe"

I think the second problem is because of an issue with the Java 8 64-bit JRE. I can reproduce that error with the 64-bit jre1.8.0_101 but using the 32-bit version works fine. I also tried it with a 64-bit JRE7 and that worked as well.

Edit: it seems you need to start the command prompt as admin as well.

TrollGate
  • 41
  • 5
  • I did indeed try that command to get it to work. The problem is that whatever JRE I use (I've tried java 7 and 8 both x32 and x64), I always get that error. – Cas Aug 26 '16 at 16:12
  • One thing I also did was to run the command prompt as admin. Have you tried that with the different JREs? – TrollGate Aug 27 '16 at 08:58
  • I also remember setting the compatibility mode to Windows 7, but I don't know if that has any effect if you run it from the command prompt. Unfortunately I don't have anything else :( – TrollGate Aug 27 '16 at 14:12
  • I got it to install by issuing the command you said in an administrator command prompt and using the 64-bit Java 7 jre. – Cas Aug 28 '16 at 08:06
  • Alright, so now it's installed. Though IntelliJ doesn't understand the references. I tried adding the installed files as dependency but can't find them (IntelliJ only takes .jar files it seems, while the installer created some .dll files).. I copied the files into the ext folder of every jdk and jre I have but it still can't find it.. – Cas Aug 28 '16 at 08:53
  • Good to hear it is installed at least! For IntelliJ to recognize the classes you need to add it as a library. If you don't use Maven, you can go to File -> Project Structure -> Libraries -> Click on Plus icon. The library you want is jpos113.jar which should be installed in your JRE/lib/ext folder by the installer. – TrollGate Aug 29 '16 at 13:25
  • Thanks. I do use Maven, but simply adding jpos as dependency doesn't work because the Epson sample code still can't find all required classes. – Cas Aug 29 '16 at 14:22
0

When I tried to install the Epson JavaPOS ADK, I end up with the two same errors :

  • Windows error 2 occured while loading the Java VM
  • then ZeroGr2: Windows DLL failed to load

I manage to make it work by :

  • Launching the installer with @TrollGate's LAX_VM parameter : i.e. : Epson_JavaPOS_ADK_1141.exe LAX_VM "C:\Program Files (x86)\Java\jdk1.8.0_101\bin\java.exe" in a admin command terminal
  • Using a 32 bits JVM : I used the 32 bits jdk1.8.0_101

I didn't need to launch the terminal as administrator to make it work, but the installation manual states that it should be run with administrator's privilege. I didn't need to change the compatibility settings of the installer either.

Gabriel Glenn
  • 1,174
  • 1
  • 13
  • 30