0

I'm working on a simple chatBot, just as a learning experience, and have hit a block. I have a rudimentery GUI setup that launches when I run the program with the command line, but not when I double-click the Jar. I am either missing code or exporting/running the program incorectly. Im using eclipse and exporting as a runnable jar. If anyone could point me towards a tutorial or some code that would be greatly appreciated.

Clarification... I want my chatBot to open a GUI when double-clicked, similar to the minecraft-server jar

EDIT I figured out what was wrong, it had nothing to do with the manifest or code... I was just executing a while loop wrong, I feel dumb now :(

2

2 Answers 2

2

In order to make your jar 'runnable' in the command line, you need to specify which class is the main class to execute.

This is done by specifying a manifest.txt file that contains the following line:

Main-Class: the_package_and_name_of_your_main_class

How this manifest file is added to your jar depends on your build tool.

Sign up to request clarification or add additional context in comments.

Comments

0

I second to Jason. Alternatively you may create one batch file (.bat) unless you want to make it work even on Linux (in this case you would .sh file).

1 Comment

The jar runs fine from the command line, but it will not open the gui when i double-click the jar

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.