简体   繁体   中英

I converted jar file to exe with launch4j and google says file hava virus

I converted a simple.java file to a.jar and converted it to.exe with Launch4j, and now Google says that my file has a virus. What should I do so that the file is not considered a virus? Does Launch4G have a virus?or do you know another app or site for that?if you know please awnser.

thats the code.

public class Main {
    public static void main(String[] args){
        new Frame();
    }
}

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Frame implements ActionListener {
    JLabel label;
    JTextField textbar;
    JButton button;





    Frame(){
        label = new JLabel("enter your age");
        label.setPreferredSize(new Dimension(300,200));
        label.setFont(new Font("nastaliq",Font.PLAIN,50));
        textbar = new JTextField();
        textbar.setPreferredSize(new Dimension(500,100));
        button = new JButton("submit");
        button.addActionListener(this);
        button.setFocusable(false);
        textbar.setPreferredSize(new Dimension(500,400));
        textbar.setFont(new Font("Arial",Font.PLAIN,100));
        textbar.setForeground(new Color(0, 148, 0));
        textbar.setBackground(new Color(0,0,0));
        textbar.setCaretColor(new Color(255,255,255));
       



        JFrame frame = new JFrame();
        frame.setLayout(new BorderLayout());
        frame.add(textbar,BorderLayout.CENTER);
        frame.add(button,BorderLayout.SOUTH);
        frame.add(label,BorderLayout.NORTH);



        frame.setDefaultCloseOperation(3);
        frame.setResizable(false);
        frame.setSize(500,500);
        frame.setVisible(true);
    }
    public void actionPerformed(ActionEvent e) {
        if (e.getSource()==button){
            label.setText("you are"+textbar.getText());
            button.setEnabled(false);
            textbar.setEditable(false);
        }
    }
}

As filters cannot verify each and every compiled program that it is presented with, they use a trust based system. Certain aspects of files are analyzed in order to determine whether it is trustworthy or not.

Sadly, many executables or compiled software in other forms is immediately distrusted by these filters. This is because they cannot verify the source and purpose of the code.

Most of the time, if you know and trust the file, you're safe to ignore the warnings, but a big rule of cybersecurity is if you don't trust it, don't touch it.

In the case of Launch4J, you are probably facing a false positive due to Google's mistrust of the code, regardless of what it does

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM