Yeah make sure you have anti virus software and minecraft doesn't have a virus on it I have a server and it's all fine all minecraft uses is your java nothing else and maybe your internet if you are playing to go on servers.
The only way to tell whether a download has a virus or not is if you have a strong antivirus or a firewall. When you will the downloading, the firewall will scan the software and determine whether it is a virus or not. If it has a suspicious file format, it will not be downloaded or installed. Therefore, it is advisable that you have a strong firewall installed on your computer.