This code is a bit outdated.
Is there a way to run a similar code with today's java?
import com.sun.servicetag.SystemEnvironment; import java.lang.management.ManagementFactory; public class Config extends java.applet.Applet{ public void paint(java.awt.Graphics g){ g.drawString("Hi.. This is Venkatesh..",50,10); SystemEnvironment se = SystemEnvironment.getSystemEnvironment(); g.drawString("CpuManufacturer:"+se.getCpuManufacturer(),50,40); g.drawString("HostID:"+se.getHostId(),50,60); g.drawString("Host Name:"+se.getHostname(),50,80); g.drawString("OS Architecture:"+se.getOsArchitecture(),50,100); g.drawString("OS Name:"+se.getOsName(),50,120); g.drawString("OS Verstion:"+se.getOsVersion(),50,140); g.drawString("Serial no:"+se.getSerialNumber(),50,160); g.drawString("System model:"+se.getSystemModel(),50,180); g.drawString("System Manufacturer:"+se.getSystemManufacturer(),50,200); com.sun.management.OperatingSystemMXBean mxbean = (com.sun.management.OperatingSystemMXBean)ManagementFactory.getOperatingSystemMXBean(); g.drawString("Available Processors:"+mxbean.getAvailableProcessors(),50,220); g.drawString("TotalRAM:"+mxbean.getTotalSwapSpaceSize()/(1024*1024*1024)+""+"GB",50,240); g.drawString("RAM SIZE :" + (mxbean.getTotalPhysicalMemorySize()/(1024*1024*1024))+ " GB ",50,260); } }