Windows 10 Notifications with Java

I am creating a Java program that pushes notifications, and I want to delete or edit a line that says: "Java (TM) Platform SE binary".

Is it possible? I searched on google, but I could not see information about it.

Here is the related code. The last line is the line that pops up the notification.

public void mostrarNotificacion(Usuario user) throws AWTException, java.net.MalformedURLException, IOException {
    //Obtain only one instance of the SystemTray object
    SystemTray tray = SystemTray.getSystemTray();

    //Get image
    BufferedImage trayIconImage = ImageIO.read(getClass().getResource("favicon.png"));
    int trayIconWidth = new TrayIcon(trayIconImage).getSize().width;
    TrayIcon trayIcon = new TrayIcon(trayIconImage.getScaledInstance(trayIconWidth, -1, Image.SCALE_SMOOTH));

    //Let the system resizes the image if needed
    trayIcon.setImageAutoSize(true);

    //Set tooltip text and notification text
    if(user.getDescargos()>=5 || user.getOtrosPendientes()>=1){
        mensaje = "Descargos pendientes: " + user.getDescargos() + "\nSecciones pendientes: "+ user.getOtrosPendientes();
    }
    trayIcon.setToolTip(mensaje);
    tray.add(trayIcon);
    trayIcon.displayMessage("Pendientes EKHI", mensaje, MessageType.WARNING);
}

enter image description here

+4
source share
1 answer

The only way to solve this problem is to use the java built-in launch.

My best bet would be a javapackager , which allows you to combine a local copy of the JVM to make your application fully portable.

launch4j, , Java.

0

Source: https://habr.com/ru/post/1681949/