The Artima Developer Community
Sponsored Link

Java Buzz Forum
How to run Java program from jar file in command line

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Javin Paul

Posts: 450
Nickname: javinpaul
Registered: Jan, 2012

Javin Paul is Java Programmer working on Finance domain.
How to run Java program from jar file in command line Posted: Dec 19, 2012 8:57 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Javin Paul.
Original Post: How to run Java program from jar file in command line
Feed Title: Java67
Feed URL: http://java67.blogspot.com/feeds/posts/default?alt=rss
Feed Description: Java and technology tutorials, tips, questions for all programmers.
Latest Java Buzz Posts
Latest Java Buzz Posts by Javin Paul
Latest Posts From Java67

Advertisement
So you got a JAR file which contains your favorite Java game and you are wondering How to run Java program from JAR  file? Or you may be simply trying your hand after running Java program from command prompt and Eclipse IDE. Anyway its good to know How to execute Java program from JAR file, as JAR file is most popular way of shipping Java programs. JAR file usually contains all source and resource in form of class files, images, sound files etc. In order to run Java program from JAR file, it must be an executable JAR file i.e. it manifest file inside META-INF folder must contain a Main-class entry like Main-Class: Hello, which specify name of Java class which contains standard main method in Java. Without Main-class entry you can not run a JAR file in Java and if you try to run such jar file using jar command you will get error "Failed to load Main-Class manifest attribute from HelloWorld.jar". If you are not very much familiar with JAR file and don't know How to create an executable JAR, See this step by step tutorial on How to create executable JAR in Java. In this tutorial we will only focusing on running Java program from an executable JAR file.
Read more »

Read: How to run Java program from jar file in command line

Topic: Yammer Metrics, A new way to monitor your application Previous Topic   Next Topic Topic: New Challenges for Enterprise Java


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us