Thank you @hamoid , that works. I had to import the java.util.List librart as well. Now I can print the cpu model name, like this:
import com.profesorfalken.jsensors.model.components.Components;
import java.util.List;
Components components;
void setup(){
components = JSensors.get.components();
size(1000, 600, OPENGL);
}
void draw(){
background(80);
List<Cpu> cpus = components.cpus; // works
for (final Cpu cpu : cpus) {
println(cpu.name);
}
List<Gpu> gpus = components.gpus; // doesn't work
for (final Gpu gpu : gpus) {
println(gpu.name);
}
}
But I cannot print the load of the cpu. How do I do that? Also, when I try to print the name of the gpu, it is not detected but doesn’t give an error either. Do you know what the problem is?
Thanks.