如果将其设为JAR文件,如何在正常运行的项目上添加Splash Screen

时间:2016-10-03 01:42:06

标签: java netbeans

我的问题是,如果我在netbeans上添加启动画面。如果您构建项目以使其成为JAR文件,则会出现错误。有没有办法让我添加一个在JAR文件中工作的启动画面?先谢谢你们。

Here is my Property Panel

enter image description here

1 个答案:

答案 0 :(得分:2)

您需要将其添加到行上方的manifest.mf文件中:

<!DOCTYPE html>
<head>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <link rel="stylesheet" href=
  "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity=
  "sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin=
  "anonymous" type="text/css" />

  <!-- Font Awesome  -->

  <script src="https://use.fontawesome.com/926120954b.js" type="text/javascript">
</script>

<!-- My CSS  -->
<link rel="stylesheet" type="text/css" href="mystyle.css">


</head>

<body>


<ul class="nav nav-tabs">
  <li role="presentation"><a href="#"><i class="fa fa-home fa-1g" aria-hidden="true"></i></a></li>

<!-- ****BEGIN THE DROPDOWN TAB-->

<li role="Presentation" class="dropdown-menu">
    <a class="Pet" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
     Community <span class="caret"></span>
    </a>
    <ul class="dropdown-menu">
      <li>item</li>
    </ul>
  </li>




<!-- ***END  THE DROPDOWN TAB  -->


  <li role="presentation"><a href="#">Pet Help</a></li>
  <li role="presentation"><a href="#">Pets for Sale</a></li>
  <li role="presentation"><a href="#">Pet Services</a></li>

</ul>








 <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" type=
  "text/javascript">
</script>
</body>
</html>

如果你愿意,可以在main方法中保留一段时间:

 X-COMMENT: Main-Class will be added automatically by build

或者在主要睡眠时在另一个线程中执行某些操作