0

I try to make an exe file of a jar file. I get a error like this:

"classpath does not contain main classes"

This error is from the program Excelsior.

shA.t
  • 16,580
  • 5
  • 54
  • 111
Torbjörn Dahlgren
  • 111
  • 1
  • 1
  • 11
  • 3
    Please add the commands you were trying, JARs added to classpath, path from which command is invoked to make exe file – Arkantos Apr 17 '15 at 08:55
  • The question is - why do you want to do that? If you just want your users to be able to double-click your application you just need a runnable jar file. – JanTheGun Apr 17 '15 at 09:11
  • when i copy the file from "project/dist/" to a usb it will do nothing when i click it – Torbjörn Dahlgren Apr 17 '15 at 11:10

1 Answers1

1

Your manifest file should be like-

Manifest-Version: 1.0
Created-By: 1.7.0_67 (Oracle Corporation)
Main-Class: MyMainClass
Class-Path: .

You must have missed "Main-Class" or "Class-Path" attribute. You can manually add these entries by editing manifest file.

Also, if you are looking for other alternatives, this will help you- How can I convert my Java program to an .exe file?

Community
  • 1
  • 1