I have been informed that Java doesn't have built-ins that get PC information, so I went looking around the net and found this. It does WMI calls in a Java program, as I can tell. Because this is a class, I am trying to use it. I think I am doing this correctly. I took from examples and tried to make it my own.
So, when I compile it, get 2 errors from where I have the class. It says that "jWMI WMIV=new jWMI();" cannot find symbol for "jWMI".
What am I doing wrong?
I have copied the .class and .java to the same folder as the wmitest.java. Does it go somewhere else or am I looking at this all wrong?
Last, question. Am I doing this all wrong?
jWMI – Query Windows WMI from Java | henryranch.net
//test the use of jWMI class call import javax.swing.JOptionPane; public class wmitest{ public static void main(String args[]){ jWMI WMIV=new jWMI(); String model = WMIV.getWMIValue("Select Model from Win32_ComputerSystem","Model"); JOptionPane.showMessageDialog(null,"This is the PC model__"+model); } }