如何使用Php自动下载.jar文件

I have looked for an answer for to long, I have the auto download and redirect done, I just need it to make the .jar file download properly. It keeps getting an error when you download and open it.

It says "Error: Invalid or corrupt jarfile C:/path/Final frontier(Pre-Alpha 0.3).jar"

<?php

header("Content-Type: 'application/jar', 'true'");
header('Content-Disposition: attachment; filename="Final frontier (Pre-> Alpha 0.3).jar"');
header("Content-Length: " . filesize("public_html/paid/game/Final frontier (Pre-Alpha 0.3).jar"));

$fp = fopen("public_html/paid/game/Final frontier (Pre-Alpha 0.3).jar", "r");
fpassthru($fp);
fclose($fp);

?>

"Thanks you so much!!! That worked! – TJGames 1 min ago"

Comments to answer, since it solved the question.

This fopen("public_html/ seems like it may be playing tricks on you. I'd either remove it fopen("paid/ if the script's running from the root, or fopen("../paid/ as an added example, or use a full server path. I.e. fopen("/var/usr/you/public_html/paid/

Do the same thing for filesize("public_html/