3

I've started developing Java applications with NetBeans some days ago and I've created an applet that makes some stuff about linear equations and disequations. That applet is also stored on my server and I load it into a webpage using the <applet /> tag. When I double click the *.jar (generated from NetBeans when I load the project) file on my computer, nothing happens. I know this is a stupid question, I've also read a lot of articles about this question but I didn't solve my problem. What could I do if I want execute that jar file from my computer?

9
  • You may have to make it a runnable jar. cafeaulait.org/course/week4/50.html Commented Jun 9, 2013 at 9:32
  • 1
    I'll do that via command line, but I only need the jar file (generated from NetBeans) and the manifest.mf file? Commented Jun 9, 2013 at 9:35
  • 1
    I think so, you'll have to write the manifest though. Alternatively the IDE may be able to help you: netbeans.org/kb/articles/javase-deploy.html#Exercise_1 Commented Jun 9, 2013 at 9:37
  • 1
    use eclipse instead of netbeans. create a project and stick all of your .java files in it. Once you have a nice project, export it as a runnable jar file. You can read up on netbeans vs eclipse, but I find eclipse faster and easier to use with java Commented Jun 9, 2013 at 9:48
  • 1
    @DK64, With Eclipse you can export as a Runnable Jar. While I do not want to start a war, I have to agree with Tucker. Commented Jun 9, 2013 at 10:01

1 Answer 1

3

What could I do if I want execute that jar file from my computer?

The easiest way to achieve that is to launch the existing applet free floating using Java Web Start. JWS Can install desktop shortcuts or menu items to launch the app.

Re. suggestions that you have to make it a runnable Jar. That will work if the app. normally is a JFrame or Frame, but it won't work for an applet unless the applet has been written as an hybrid application/applet (and since you did not do that deliberately, no it wasn't).

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.