Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As MadProgrammer said, you can edit your <code>build.xml</code> on the <code>-post-jar</code> target. To do this, then you can refer to <a href="http://ant.apache.org/manual/Tasks/copydir.html" rel="nofollow noreferrer">this</a> link, <a href="http://ant.apache.org/manual/Tasks/jar.html" rel="nofollow noreferrer">this</a> link, and <a href="https://stackoverflow.com/questions/3497019/how-can-i-include-a-folder-into-the-dist-jar-as-part-of-the-build-process-using">this</a> question.</p> <ol> <li><p>If you have to include libraries as well, try a simple DOS script. Build the java project with Netbeans as usual, then create a directory named 'NewDist' inside NetBeans' project directory and create a file named JarMaker.bat. Here's the script.</p> <pre><code>@echo off echo * -------------------------------------------------------- * echo * - JarMaker V 2.0.0 - For Netbeans Projects - * echo * -------------------------------------------------------- * echo 1) Creating Temporary Directory mkdir classes echo 2) Copying Library Jars xcopy /s /y ..\dist\lib\*.jar classes &gt;&gt; nul cd classes echo 3) Deflating Library Jars (this may take a while) for /f %%a IN ('dir /b *.jar') do jar xf %%a &gt;&gt; nul del *.jar &gt;&gt; nul cd .. echo 4) Deflating Main Program Jar xcopy /y ..\dist\*.jar classes &gt;&gt; nul cd classes for /f %%a IN ('dir /b *.jar') do jar xf %%a &gt;&gt; nul del *.jar &gt;&gt; nul echo 5) Creating Unique Jar (this may take a while) jar cvfm ../dist.jar META-INF/manifest.mf ./ &gt;&gt; nul for /f %%a IN ('dir /b ..\..\dist\*.jar') do ren ..\dist.jar %%a &gt;&gt; nul cd .. echo 6) Removing Temporary Files rmdir /s /q classes &gt;&gt; nul echo * -------------------------------------------------------- * echo * - JarMaker V 2.0.0 - Process Complete - * echo * -------------------------------------------------------- * </code></pre></li> </ol> <p><a href="http://www.coderanch.com/t/419419/vc/netbeans-include-external-libraries-project" rel="nofollow noreferrer">Source</a></p> <p>Instead if you want to include images, <a href="https://stackoverflow.com/questions/2273040/how-to-bundle-images-in-jar-file">take a look at this question</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload