Hi I am getting this error:
Error loading win32com: java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jre1.8.0_60\bin\win32com.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
while running this program:
public static void main(String args[]) {
Enumeration ports = CommPortIdentifier.getPortIdentifiers();
System.out.println(ports.hasMoreElements());
while (ports.hasMoreElements()) {
CommPortIdentifier port = (CommPortIdentifier) ports.nextElement();
String type;
switch (port.getPortType()) {
case CommPortIdentifier.PORT_PARALLEL:
type = "Parallel";
break;
case CommPortIdentifier.PORT_SERIAL:
type = "Serial";
break;
default: /// Shouldn't happen
type = "Unknown";
break;
}
System.out.println(port.getName() + ": " + type);
}
// System.out.println(port.getName());
}
I am using java 1.8
Thanks in advance