Java classes into .bat file or something?

Question by Jolene: Java classes into .bat file or something?
Basically, I have a series of .class files that work together. How do I make these into a .bat file or something so that I can run the java “program” outside of eclipse?
If it helps, the .class files are named “Build1.class”, “Stageclass.class”, and “Stage1.class”
Tried making the .jar file, keep getting the error “Failed to load Main-Class manifest attribute from “C:\Users\Default\Workspace\Test.jar”

Best answer:

Answer by Your_name_in_verse
You want to make a .jar file. Right click your project and select “Export”, select JAR and name it and you are good to go!

step by step link in the sources.

Know better? Leave your own answer in the comments!

Author: admin

2 thoughts on “Java classes into .bat file or something?

  1. create a .jar file
    you need an IDE like BlueJ or eclipse from which you can easily create .jar file

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.