project_creation.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <title>jMonkeyEngine SDK: Creating Projects :: jMonkeyEngine Docs</title>
  7. <link rel="canonical" href="https://wiki.jmonkeyengine.org/docs/sdk/project_creation.html">
  8. <meta name="keywords" content="documentation, project, deployment, sdk">
  9. <meta name="generator" content="Antora 2.3.3">
  10. <link rel="stylesheet" href="../../_/css/site.css">
  11. <meta property="og:image" content="https://wiki.jmonkeyengine.org/_/img/iconx128.png">
  12. <meta property="og:description" content="jMonkeyEngine SDK: Creating Projects">
  13. <meta property="og:title" content="jMonkeyEngine Docs">
  14. <link rel="stylesheet" href="../../_/css/site-extra.css">
  15. <link rel="icon" href="../../_/img/favicon.ico" type="image/x-icon">
  16. </head>
  17. <body class="article">
  18. <header class="header">
  19. <nav class="navbar">
  20. <div class="navbar-brand">
  21. <a class="navbar-item" href="https://wiki.jmonkeyengine.org">
  22. <img alt="" src="../../_/img/jMonkeyDocLogo.png" height="32" type="image/x-icon">
  23. </a>
  24. <div class="navbar-item hide-for-print">
  25. <input type="text" placeholder="Search docs..." id="search-input"/>
  26. </div>
  27. <button class="navbar-burger" data-target="topbar-nav">
  28. <span></span>
  29. <span></span>
  30. <span></span>
  31. </button>
  32. </div>
  33. <div id="topbar-nav" class="navbar-menu">
  34. <div class="navbar-end">
  35. <div class="navbar-item theme-switch-wrapper">
  36. <label class="theme-switch" for="checkbox">
  37. <input type="checkbox" id="checkbox" />
  38. <div class="slider round"></div>
  39. </label>
  40. </div>
  41. <a class="navbar-item" href="https://github.com/jmonkeyengine/wiki">Github</a>
  42. </div>
  43. </div>
  44. </nav>
  45. </header>
  46. <div class="body">
  47. <div class="nav-container" data-component="docs" data-version="master">
  48. <aside class="nav">
  49. <div class="panels">
  50. <div class="nav-panel-menu is-active" data-panel="menu">
  51. <nav class="nav-menu">
  52. <h3 class="title"><a href="../documentation.html">Docs</a></h3>
  53. <ul class="nav-list">
  54. <li class="nav-item" data-depth="0">
  55. <ul class="nav-list">
  56. <li class="nav-item" data-depth="1">
  57. <a class="nav-link" href="../documentation.html">Getting Started</a>
  58. </li>
  59. <li class="nav-item" data-depth="1">
  60. <a class="nav-link" href="https://javadoc.jmonkeyengine.org/v3.3.2-stable">JavaDoc</a>
  61. </li>
  62. <li class="nav-item" data-depth="1">
  63. <button class="nav-item-toggle"></button>
  64. <a class="nav-link" href="../jme3.html">jMonkeyEngine 3</a>
  65. <ul class="nav-list">
  66. <li class="nav-item" data-depth="2">
  67. <button class="nav-item-toggle"></button>
  68. <span class="nav-text">Beginner Tutorials</span>
  69. <ul class="nav-list">
  70. <li class="nav-item" data-depth="3">
  71. <a class="nav-link" href="../jme3/beginner/hello_simpleapplication.html">Hello SimpleApplication</a>
  72. </li>
  73. <li class="nav-item" data-depth="3">
  74. <a class="nav-link" href="../jme3/beginner/hello_node.html">Hello Node</a>
  75. </li>
  76. <li class="nav-item" data-depth="3">
  77. <a class="nav-link" href="../jme3/beginner/hello_asset.html">Hello Asset</a>
  78. </li>
  79. <li class="nav-item" data-depth="3">
  80. <a class="nav-link" href="../jme3/beginner/hello_main_event_loop.html">Hello Main Event Loop</a>
  81. </li>
  82. <li class="nav-item" data-depth="3">
  83. <a class="nav-link" href="../jme3/beginner/hello_input_system.html">Hello Input System</a>
  84. </li>
  85. <li class="nav-item" data-depth="3">
  86. <a class="nav-link" href="../jme3/beginner/hello_material.html">Hello Material</a>
  87. </li>
  88. <li class="nav-item" data-depth="3">
  89. <a class="nav-link" href="../jme3/beginner/hello_animation.html">Hello Animation</a>
  90. </li>
  91. <li class="nav-item" data-depth="3">
  92. <a class="nav-link" href="../jme3/beginner/hello_picking.html">Hello Picking</a>
  93. </li>
  94. <li class="nav-item" data-depth="3">
  95. <a class="nav-link" href="../jme3/beginner/hello_collision.html">Hello Collision</a>
  96. </li>
  97. <li class="nav-item" data-depth="3">
  98. <a class="nav-link" href="../jme3/beginner/hello_terrain.html">Hello Terrain</a>
  99. </li>
  100. <li class="nav-item" data-depth="3">
  101. <a class="nav-link" href="../jme3/beginner/hello_audio.html">Hello Audio</a>
  102. </li>
  103. <li class="nav-item" data-depth="3">
  104. <a class="nav-link" href="../jme3/beginner/hello_effects.html">Hello Effects</a>
  105. </li>
  106. <li class="nav-item" data-depth="3">
  107. <a class="nav-link" href="../jme3/beginner/hello_physics.html">Hello Physics</a>
  108. </li>
  109. </ul>
  110. </li>
  111. <li class="nav-item" data-depth="2">
  112. <button class="nav-item-toggle"></button>
  113. <span class="nav-text">Intermediate Tutorials</span>
  114. <ul class="nav-list">
  115. <li class="nav-item" data-depth="3">
  116. <button class="nav-item-toggle"></button>
  117. <span class="nav-text">Concepts</span>
  118. <ul class="nav-list">
  119. <li class="nav-item" data-depth="4">
  120. <a class="nav-link" href="../jme3/intermediate/best_practices.html">Best Practices</a>
  121. </li>
  122. <li class="nav-item" data-depth="4">
  123. <a class="nav-link" href="../jme3/intermediate/simpleapplication.html">Simple Application</a>
  124. </li>
  125. <li class="nav-item" data-depth="4">
  126. <a class="nav-link" href="../jme3/features.html">Features</a>
  127. </li>
  128. <li class="nav-item" data-depth="4">
  129. <a class="nav-link" href="../jme3/intermediate/optimization.html">Optimization</a>
  130. </li>
  131. <li class="nav-item" data-depth="4">
  132. <a class="nav-link" href="../jme3/faq.html">FAQ</a>
  133. </li>
  134. </ul>
  135. </li>
  136. <li class="nav-item" data-depth="3">
  137. <button class="nav-item-toggle"></button>
  138. <span class="nav-text">Math Concepts</span>
  139. <ul class="nav-list">
  140. <li class="nav-item" data-depth="4">
  141. <a class="nav-link" href="../jme3/math_for_dummies.html">Math For Dummies</a>
  142. </li>
  143. <li class="nav-item" data-depth="4">
  144. <a class="nav-link" href="../jme3/intermediate/math.html">Math</a>
  145. </li>
  146. <li class="nav-item" data-depth="4">
  147. <a class="nav-link" href="../jme3/math.html">More Math</a>
  148. </li>
  149. <li class="nav-item" data-depth="4">
  150. <a class="nav-link" href="../jme3/rotate.html">Rotate</a>
  151. </li>
  152. <li class="nav-item" data-depth="4">
  153. <a class="nav-link" href="../jme3/math_video_tutorials.html">Math Video Tutorials</a>
  154. </li>
  155. </ul>
  156. </li>
  157. <li class="nav-item" data-depth="3">
  158. <button class="nav-item-toggle"></button>
  159. <span class="nav-text">3D Graphics Concepts</span>
  160. <ul class="nav-list">
  161. <li class="nav-item" data-depth="4">
  162. <a class="nav-link" href="../jme3/intermediate/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a>
  163. </li>
  164. <li class="nav-item" data-depth="4">
  165. <a class="nav-link" href="../jme3/scenegraph_for_dummies.html">Scenegraph for Dummies</a>
  166. </li>
  167. <li class="nav-item" data-depth="4">
  168. <a class="nav-link" href="../jme3/beginner/hellovector.html">Hello Vector</a>
  169. </li>
  170. <li class="nav-item" data-depth="4">
  171. <a class="nav-link" href="../jme3/terminology.html">Terminology</a>
  172. </li>
  173. <li class="nav-item" data-depth="4">
  174. <a class="nav-link" href="../jme3/intermediate/how_to_use_materials.html">How to Use Materials</a>
  175. </li>
  176. <li class="nav-item" data-depth="4">
  177. <a class="nav-link" href="../jme3/intermediate/transparency_sorting.html">Transparency and Sorting</a>
  178. </li>
  179. <li class="nav-item" data-depth="4">
  180. <a class="nav-link" href="../jme3/external/blender.html">Importing from Blender</a>
  181. </li>
  182. <li class="nav-item" data-depth="4">
  183. <a class="nav-link" href="../jme3/external/3dsmax.html">Importing from 3DS Max</a>
  184. </li>
  185. </ul>
  186. </li>
  187. </ul>
  188. </li>
  189. </ul>
  190. </li>
  191. <li class="nav-item" data-depth="1">
  192. <a class="nav-link" href="../logo.html">Logo Usage</a>
  193. </li>
  194. <li class="nav-item" data-depth="1">
  195. <a class="nav-link" href="../bsd_license.html">License</a>
  196. </li>
  197. <li class="nav-item" data-depth="1">
  198. <a class="nav-link" href="../github_tips.html">Github Tips</a>
  199. </li>
  200. </ul>
  201. </li>
  202. <li class="nav-item" data-depth="0">
  203. <button class="nav-item-toggle"></button>
  204. <span class="nav-text">SDK</span>
  205. <ul class="nav-list">
  206. <li class="nav-item" data-depth="1">
  207. <a class="nav-link" href="../sdk.html">jMonkeyEngine SDK</a>
  208. </li>
  209. </ul>
  210. </li>
  211. </ul>
  212. </nav>
  213. </div>
  214. <div class="nav-panel-explore" data-panel="explore">
  215. <div class="context">
  216. <span class="title">Docs</span>
  217. <span class="version">master</span>
  218. </div>
  219. <ul class="components">
  220. <li class="component is-current">
  221. <span class="title">Docs</span>
  222. <ul class="versions">
  223. <li class="version is-current is-latest">
  224. <a href="../documentation.html">master</a>
  225. </li>
  226. </ul>
  227. </li>
  228. <li class="component">
  229. <span class="title">Wiki UI</span>
  230. <ul class="versions">
  231. <li class="version is-latest">
  232. <a href="../../wiki-ui/index.html">master</a>
  233. </li>
  234. </ul>
  235. </li>
  236. </ul>
  237. </div>
  238. </div>
  239. </aside>
  240. </div>
  241. <main class="article">
  242. <div class="toolbar" role="navigation">
  243. <button class="nav-toggle"></button>
  244. <nav class="breadcrumbs" aria-label="breadcrumbs">
  245. <ul>
  246. <li><a href="../documentation.html">Docs</a></li>
  247. <li><a href="project_creation.html">jMonkeyEngine SDK: Creating Projects</a></li>
  248. </ul>
  249. </nav>
  250. <div class="edit-this-page"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/docs/modules/ROOT/pages/sdk/project_creation.adoc">Edit this Page</a></div>
  251. </div>
  252. <div class="content">
  253. <article class="doc">
  254. <h1 class="page">jMonkeyEngine SDK: Creating Projects</h1>
  255. <div id="preamble">
  256. <div class="sectionbody">
  257. <div class="paragraph">
  258. <p>The jMonkeyEngine SDK makes it easy to get started with developing 3-D games based on the jMonkeyEngine.</p>
  259. </div>
  260. </div>
  261. </div>
  262. <div class="sect1">
  263. <h2 id="creating-a-new-jmonkeyengine-project"><a class="anchor" href="#creating-a-new-jmonkeyengine-project"></a>Creating a New jMonkeyEngine Project</h2>
  264. <div class="sectionbody">
  265. <div class="olist arabic">
  266. <ol class="arabic">
  267. <li>
  268. <p>Choose <code><span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">New Project</b></span></code> from the main menu.</p>
  269. </li>
  270. <li>
  271. <p>In the New Project Wizard, select the template <code><span class="menuseq"><b class="menu">JME3</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Basic Game</b></span></code>.</p>
  272. </li>
  273. <li>
  274. <p>Click next to specify a project name, and the path where to store your new project.</p>
  275. </li>
  276. <li>
  277. <p>Click Finish. A skeleton application is created and opens in the Project Explorer.</p>
  278. <div class="ulist">
  279. <ul>
  280. <li>
  281. <p>This basic jme3 application is based on the SimpleApplication class to allow an easy start with jme3.</p>
  282. </li>
  283. <li>
  284. <p>You can click the run button to run it: You will see a blue cube.</p>
  285. </li>
  286. </ul>
  287. </div>
  288. </li>
  289. </ol>
  290. </div>
  291. <div class="sect2">
  292. <h3 id="project-structure"><a class="anchor" href="#project-structure"></a>Project Structure</h3>
  293. <div class="imageblock text-center">
  294. <div class="content">
  295. <img src="../_images/sdk/jmonkeyplatform-docu-4.png" alt="jmonkeyplatform-docu-4.png" width="421" height="298">
  296. </div>
  297. </div>
  298. <div class="paragraph">
  299. <p>Let&#8217;s have a look at the abstract project structure in the Project Explorer. (<kbd>Ctrl</kbd>+<kbd>1</kbd>).</p>
  300. </div>
  301. <div class="ulist">
  302. <ul>
  303. <li>
  304. <p><strong>Project Assets node:</strong> These directories have been created for you to store your games assets, such as fonts, materials, models, shaders, sounds, and textures. For a newly created project, these directories are empty.</p>
  305. </li>
  306. <li>
  307. <p><strong>Source Packages node:</strong> This is where you manage your packages and classes. For a newly created project, it contains one package and one class, <code>Main.java</code>. Double click <code>Main.java</code> to open it in the editor.</p>
  308. </li>
  309. <li>
  310. <p><strong>Libraries node:</strong> An overview of all libraies on your game&#8217;s classpath. The classpath is already set-up for the jme3 framework (including LWJGL, Bullet, Nifty <abbr title="Graphical User Interface">GUI</abbr>, etc).</p>
  311. </li>
  312. </ul>
  313. </div>
  314. </div>
  315. <div class="sect2">
  316. <h3 id="directory-structure"><a class="anchor" href="#directory-structure"></a>Directory Structure</h3>
  317. <div class="paragraph">
  318. <p>Now let&#8217;s have a look at the project&#8217;s file structure in the File Explorer (<kbd>Ctrl</kbd>+<kbd>2</kbd>). This explorer shows the physical directory structure on your hard drive.</p>
  319. </div>
  320. <div class="ulist">
  321. <ul>
  322. <li>
  323. <p><strong>assets</strong> – This directory corresponds to the Project Assets node. It is needed for the assetManager.</p>
  324. <div class="paragraph">
  325. <p>This is the recommended internal structure:</p>
  326. </div>
  327. <div class="ulist">
  328. <ul>
  329. <li>
  330. <p><code>assets/Interface</code></p>
  331. </li>
  332. <li>
  333. <p><code>assets/MatDefs</code></p>
  334. </li>
  335. <li>
  336. <p><code>assets/Materials</code></p>
  337. </li>
  338. <li>
  339. <p><code>assets/Models</code></p>
  340. </li>
  341. <li>
  342. <p><code>assets/Scenes</code></p>
  343. </li>
  344. <li>
  345. <p><code>assets/Shaders</code></p>
  346. </li>
  347. <li>
  348. <p><code>assets/Sounds</code></p>
  349. </li>
  350. <li>
  351. <p><code>assets/Textures</code></p>
  352. </li>
  353. </ul>
  354. </div>
  355. </li>
  356. <li>
  357. <p><strong>src</strong> – This directory corresponds to the Source Packages node. Your sources code goes here.</p>
  358. </li>
  359. <li>
  360. <p><strong>nbproject</strong> – This is meta data used by the jMonkeyEngine SDK (don&#8217;t edit).</p>
  361. </li>
  362. <li>
  363. <p><strong>build.xml</strong> – This is an Ant build script that is hooked up to the clean/build/run/test actions in the jMonkeyEngine SDK. It loads a default build script, and allows you to further customize the build process. The Ant script also assures that you are able to clean/build/run/test your application outside of the jMonkeyEngine SDK – e.g. from the command line.</p>
  364. </li>
  365. <li>
  366. <p><strong>build</strong> – This directory contains the compiled classes. (Will be generated by the jMonkeyEngine SDK when you build the project.)</p>
  367. </li>
  368. <li>
  369. <p><strong>dist</strong> – This directory contains the executable JAR files. (Will be generated by the jMonkeyEngine SDK when you build the project.)</p>
  370. </li>
  371. <li>
  372. <p><strong>test</strong> – The jMonkeyEngine SDK will store JUnit tests here if you create any. (Optional.)</p>
  373. </li>
  374. </ul>
  375. </div>
  376. </div>
  377. <div class="sect2">
  378. <h3 id="project-configuration"><a class="anchor" href="#project-configuration"></a>Project Configuration</h3>
  379. <div class="paragraph">
  380. <p>[RMB] select the project and from the menu open the project <code>Properties</code>.</p>
  381. </div>
  382. <div class="ulist">
  383. <ul>
  384. <li>
  385. <p>In the <code>Run</code> section:</p>
  386. <div class="ulist">
  387. <ul>
  388. <li>
  389. <p>Specify the main class of your project. (Pressing <kbd>F6</kbd> runs this main class.)</p>
  390. </li>
  391. <li>
  392. <p>You can optionally configure JVM options and command line parameters. In most cases, set the <code>-Xms VMOption [NUMBER] m</code> for the memory usage.</p>
  393. <div class="ulist">
  394. <ul>
  395. <li>
  396. <p>For example (-Xms500m).</p>
  397. </li>
  398. <li>
  399. <p>see <a href="http://performance.netbeans.org/howto/jvmswitches/">http://performance.netbeans.org/howto/jvmswitches/</a>).</p>
  400. </li>
  401. </ul>
  402. </div>
  403. </li>
  404. </ul>
  405. </div>
  406. </li>
  407. <li>
  408. <p>In the Application section:</p>
  409. <div class="ulist">
  410. <ul>
  411. <li>
  412. <p>Specify the game title (by default the game will be named <code>BasicGame</code>).</p>
  413. </li>
  414. <li>
  415. <p>Specify the vendor name (your name), a short description, your project&#8217;s homepage, and a splash screen.</p>
  416. </li>
  417. </ul>
  418. </div>
  419. </li>
  420. </ul>
  421. </div>
  422. </div>
  423. <div class="sect2">
  424. <h3 id="clean-build-and-run-cycle"><a class="anchor" href="#clean-build-and-run-cycle"></a>Clean, Build and Run Cycle</h3>
  425. <div class="imageblock text-center">
  426. <div class="content">
  427. <img src="../_images/sdk/jmonkeyplatform-docu-5.png" alt="jmonkeyplatform-docu-5.png" width="421" height="298">
  428. </div>
  429. </div>
  430. <div class="admonitionblock important">
  431. <table>
  432. <tr>
  433. <td class="icon">
  434. <i class="fa icon-important" title="Important"></i>
  435. </td>
  436. <td class="content">
  437. <div class="paragraph">
  438. <p>Pressing <strong><kbd>F6</kbd> builds &amp; runs</strong> the <em>main</em> class of the <em>main project</em>. If there are several classes, or several projects, you have to specify which one you want <kbd>F6</kbd> to run. <b class="button">RMB</b> select a project and choose <code>Set As Main Project</code>, then <b class="button">RMB</b> select the project again and choose <code><span class="menuseq"><b class="menu">Properties</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Run</b></span></code> and choose a Main Class.</p>
  439. </div>
  440. <div class="paragraph">
  441. <p>To build and run the main() of <em>any file that is open in the editor</em>, press <kbd>Shift</kbd>+<kbd>F6</kbd>!</p>
  442. </div>
  443. </td>
  444. </tr>
  445. </table>
  446. </div>
  447. <div class="ulist">
  448. <ul>
  449. <li>
  450. <p><b class="button">RMB</b> select the project and use the context-menu to clean all generated classes and JARs.</p>
  451. </li>
  452. <li>
  453. <p><b class="button">RMB</b> select individual files with a main method to build and run them. (<kbd>Shift</kbd>+<kbd>F6</kbd>)</p>
  454. </li>
  455. <li>
  456. <p>Press the <b class="button">Run</b> button (green arrow in the toolbar) to build and run the project. (<kbd>F6</kbd>)</p>
  457. </li>
  458. </ul>
  459. </div>
  460. <div class="paragraph">
  461. <p><strong>More than one project open?</strong> The toolbar buttons and the F-keys are bound to the main project, which is shown in bold in the Project Explorer. <b class="button">RMB</b> select a project and select <code>Set As Main Project</code> to make it respond to the toolbar buttons and F-keys.</p>
  462. </div>
  463. <div class="paragraph">
  464. <p><strong>Worried About Proprietary Lock-in?</strong> You are never locked into the jMonkeyEngine SDK: At any time, you can change into your project directory on the command line, and clean, build, and run your project, using non-proprietary Apache Ant commands:</p>
  465. </div>
  466. <div class="listingblock">
  467. <div class="content">
  468. <pre class="highlightjs highlight"><code>ant clean; ant jar; ant run;</code></pre>
  469. </div>
  470. </div>
  471. </div>
  472. </div>
  473. </div>
  474. <div class="sect1">
  475. <h2 id="development-process"><a class="anchor" href="#development-process"></a>Development Process</h2>
  476. <div class="sectionbody">
  477. <div class="ulist">
  478. <ul>
  479. <li>
  480. <p><strong>Creating new files and packages:</strong> Select the Source Packages node (or any of its subnodes), and press <kbd>Ctrl</kbd>+<kbd>N</kbd> (<code><span class="menuseq"><b class="menu">File</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">New File</b></span></code>): Use the <code>New File</code> wizard to create new Java classes, Java packages, Java beans, Swing forms, JUnit files, j3m Materials, j3o scenes, j3f filters, and many more.</p>
  481. </li>
  482. <li>
  483. <p><strong>Editing files:</strong> Open the Projects Explorer and double-click a Java file from the Source Packages to open it in the Editor. The <a href="code_editor.html" class="page">jMonkeyEngine SDK Code Editor</a> assists you in many ways, including syntactic and semantic code coloring, code completion, and javadoc.</p>
  484. </li>
  485. <li>
  486. <p><strong>Adding Assets:</strong></p>
  487. <div class="ulist">
  488. <ul>
  489. <li>
  490. <p>You can <a href="model_loader_and_viewer.html" class="page">import models, scenes, and materials</a> as assets into your project.</p>
  491. </li>
  492. <li>
  493. <p>To add sound files and images, use your operating system&#8217;s file explorer and copy the files into your project&#8217;s asset directory.</p>
  494. </li>
  495. </ul>
  496. </div>
  497. </li>
  498. <li>
  499. <p><strong>ToDo List:</strong> The tasks window automatically lists all lines containing errors and warnings, and all lines that you have marked with the comment keywords</p>
  500. <div class="listingblock">
  501. <div class="content">
  502. <pre class="highlightjs highlight"><code class="language-html hljs" data-lang="html">FIXME</code></pre>
  503. </div>
  504. </div>
  505. <div class="paragraph">
  506. <p>, @todo, or TODO.</p>
  507. </div>
  508. </li>
  509. <li>
  510. <p><strong>Integrated tools:</strong> <a href="debugging_profiling_testing.html" class="page">Debugging, Testing, Profiling</a>.</p>
  511. </li>
  512. </ul>
  513. </div>
  514. <div class="sect2">
  515. <h3 id="adding-external-jar-libraries"><a class="anchor" href="#adding-external-jar-libraries"></a>Adding external jar libraries</h3>
  516. <div class="paragraph">
  517. <p>You may want to use external Java libraries in your jME project, for example content generators or artificial intelligence implementations.</p>
  518. </div>
  519. <div class="paragraph">
  520. <p>Add the library to the global library list:</p>
  521. </div>
  522. <div class="ulist">
  523. <ul>
  524. <li>
  525. <p>Select <span class="menuseq"><b class="menu">Tools</b>&#160;<i class="fa fa-angle-right caret"></i> <b class="menuitem">Libraries</b></span> in the main menu.</p>
  526. </li>
  527. <li>
  528. <p>Click &#8220;New Library&#8221;, enter a name for the library, and press <b class="button">OK</b>.</p>
  529. </li>
  530. <li>
  531. <p>In the &#8220;Classpath&#8221; tab, press &#8220;Add JAR/Folder&#8221; and select the jar file(s) needed for the library.</p>
  532. </li>
  533. <li>
  534. <p>(Optional) In the &#8220;JavaDoc&#8221; tab, press &#8220;Add ZIP/Folder&#8221; and select the javadoc for the library, as zip file or folder.</p>
  535. </li>
  536. <li>
  537. <p>(Optional) In the &#8220;Sources&#8221; tab you can select a folder or jar file containing the source files of the library.</p>
  538. </li>
  539. <li>
  540. <p>Press <b class="button">OK</b>.</p>
  541. </li>
  542. </ul>
  543. </div>
  544. <div class="paragraph">
  545. <p>Add the library to a project:</p>
  546. </div>
  547. <div class="ulist">
  548. <ul>
  549. <li>
  550. <p><b class="button">RMB</b> select your project and select &#8220;Properties&#8221;.</p>
  551. </li>
  552. <li>
  553. <p>Select &#8220;Libaries&#8221; on the left and then press &#8220;Add Library&#8221;.</p>
  554. </li>
  555. <li>
  556. <p>Select the library from the list and press <b class="button">OK</b>.</p>
  557. </li>
  558. </ul>
  559. </div>
  560. <div class="paragraph">
  561. <p>That&#8217;s it, your project can now use the external library. If you also linked the javadoc and sources, the SDK will assist you with javadoc popups, code completion (<kbd>Ctrl</kbd>+<kbd>Space</kbd>) and source navigation (<kbd>Ctrl</kbd>+<b class="button">LMB</b> ).</p>
  562. </div>
  563. </div>
  564. <div class="sect2">
  565. <h3 id="application-deployment"><a class="anchor" href="#application-deployment"></a>Application Deployment</h3>
  566. <div class="ulist">
  567. <ul>
  568. <li>
  569. <p>You can <a href="application_deployment.html" class="page">deploy</a> your game as desktop application (JAR), browser applet, WebStart (JNLP), or on the Android platform.</p>
  570. </li>
  571. </ul>
  572. </div>
  573. </div>
  574. </div>
  575. </div>
  576. <div class="sect1">
  577. <h2 id="running-sample-projects"><a class="anchor" href="#running-sample-projects"></a>Running Sample Projects</h2>
  578. <div class="sectionbody">
  579. <div class="paragraph">
  580. <p>The SDK contains <a href="sample_code.html" class="page">Sample Code</a> (read more).</p>
  581. </div>
  582. <div class="paragraph">
  583. <p>Open the Source Packages node of the JmeTests project.</p>
  584. </div>
  585. <div class="ulist">
  586. <ul>
  587. <li>
  588. <p><b class="button">RMB</b> select the <code>JME3Tests</code> project and choose Run.<br>
  589. Choose samples from the TestChooser and try out the included demos.</p>
  590. </li>
  591. <li>
  592. <p>Browse a demo&#8217;s source code in the SDK&#8217;s Project window to learn how a feature is implemented and used.</p>
  593. </li>
  594. <li>
  595. <p>Feel free to modify the code samples and experiment! If you break something, you can always recreate the packaged samples from the <code>JME3 Tests</code> template.</p>
  596. </li>
  597. </ul>
  598. </div>
  599. </div>
  600. </div>
  601. </article>
  602. <aside class="toc sidebar" data-title="Contents" data-levels="2">
  603. <div class="toc-menu"></div>
  604. </aside>
  605. </div>
  606. </main>
  607. </div>
  608. <footer class="footer">
  609. <p>Copyright 2020 jMonkeyEngine Wiki Contributors. Licensed BSD-3.</p>
  610. </footer>
  611. <script src="../../_/js/site.js"></script>
  612. <script async src="../../_/js/vendor/highlight.js"></script>
  613. </body>
  614. </html>