Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Had you tried creating a .jar file manually instead of using Eclipse. Try the following steps, hopefully that might help :</p> <p>Considering that your directory structure looks like this : </p> <pre><code> TicTacToe(Your Project Name I mean) | | | src bin manifest.txt | | icons tictactoe </code></pre> <p>Now suppose that my main class is <code>BeginGame</code> inside package <code>tictactoe</code>, so I will write inside my manifest.txt file this thing : </p> <pre><code>Main-Class: tictactoe.BeginGame </code></pre> <p>Do remember the space between colons <code>:</code> and package name i.e. <code>tictactoe</code>, and immediately after <code>BeginGame</code> press Enter and save the file.</p> <p>Now on your command prompt go to the location of bin folder, I am describing my side as follows : </p> <pre><code>C:\Mine\Eclipse\TicTacToe\bin&gt;jar -cfm ..\tictactoe.jar ..\manifest.txt tictactoe icons </code></pre> <ul> <li>Here the first argument i.e. <code>..\tictactoe.jar</code> is used to tell that create tictactoe.jar one level up, i.e. inside <code>TicTacToe Folder</code>.</li> <li>Second argument <code>..\manifest.txt</code> means that the manifest.txt file is located one level up, i.e. inside <code>TicTacToe Folder</code>.</li> <li>Third and Fourth arguments <code>tictactoe</code> and <code>icons</code> means, that add both these folders to the <code>.jar</code> file, since they are placed inside <code>bin</code> Folder so they are used as it is. Now Press Enter.</li> </ul> <p>Now try to run your .jar file so created inside the <code>Project Folder</code> (TicTacToe Folder, in my case). </p> <p>Hopefully this will work.</p>
 

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