Si ejecuto el proyecto en debug o realese no tengo ningún error ni problema, obtengo los datos y los modifico como deseo, este es el log
Los valores con % están tratados para obtener un string con 2 decimales:
El problema viene cuando creo un paquete independiente con B4XPackager11 (.exe), el programa se cierra, este el registro:
como puedo hacerlo?
Log:
Waiting for debugger to connect...
Program started.
win: true
linux: false
11.64773
Name CPU: Intel Core i7-7700K
Temperature CPU Package: 51
Load CPU Total: 6.65%
Load Used Space: 13.09%
RPM Fan: 1097
Los valores con % están tratados para obtener un string con 2 decimales:
B4X:
Dim loadDISCK As String
Dim loadDISCK2 As Double
Dim sdataM As SensorData = firstDISKs.Sensors.Loads.Get(d)
loadDISCK = sdataM.Value
nameDsisk = sdataM.Name
loadDISCK2 = loadDISCK
loadDISCK = NumberFormat(loadDISCK2,0,2)
loadDISCK2 = loadDISCK
El problema viene cuando creo un paquete independiente con B4XPackager11 (.exe), el programa se cierra, este el registro:
Log:
C:\Users\rafab\OneDrive\Escritorio\PROYECTO SENSORES PC\MONITORIZACION PC\Objects\temp\build>cd bin
C:\Users\rafab\OneDrive\Escritorio\PROYECTO SENSORES PC\MONITORIZACION PC\Objects\temp\build\bin>java.exe @release_java_modules.txt -m b4j/b4j.monitorizar.main
[JavaFX Application Thread] WARN com.profesorfalken.jsensors.JSensors - You have not executed jSensors in Administrator mode, so CPU temperature sensors will not be detected.
win: true
linux: false
1350756
main$ResumableSub_controlLoad.resume (java line: -1)
java.lang.NumberFormatException: For input string: "1,350,756"
at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.base/jdk.internal.math.FloatingDecimal.parseDouble(Unknown Source)
at java.base/java.lang.Double.parseDouble(Unknown Source)
at b4j/b4j.monitorizar.main$ResumableSub_controlLoad.resume(Unknown Source)
at b4j/b4j.monitorizar.main._controlload(Unknown Source)
at b4j/b4j.monitorizar.main$ResumableSub_CPU_FetchComplete.resume(Unknown Source)
at b4j/anywheresoftware.b4a.BA.checkAndRunWaitForEvent(Unknown Source)
at b4j/anywheresoftware.b4a.BA.raiseEvent2(Unknown Source)
at b4j/anywheresoftware.b4a.BA.raiseEvent(Unknown Source)
at b4j/anywheresoftware.b4a.keywords.Common$3.run(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
C:\Users\rafab\OneDrive\Escritorio\PROYECTO SENSORES PC\MONITORIZACION PC\Objects\temp\build\bin>pause
Presione una tecla para continuar . . .
Last edited: