Could not find the main class error - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

IdahoEv
Posts: 1
Joined: Wed Jul 09, 2008 4:58 am

Could not find the main class error

We've used advanced installer in the past to package up our Java application, but lately we cannot get it to work. Every attempt produces an installed application that, when run, results in "Could not find the main class mycompany/MyProduct/MyMainClass".

We can't figure out what we're doing differently - I'm sure it's something stupid - but we'd appreciate any help.

Here are the things I've already checked:
  • MANIFEST.MF in JAR file is set correctly
  • The jar file runs fine when double-clicked on a windows machine with a JRE installed
  • In Advanced Installer, the selection for main class is set to the same class as set in the manifest file
  • We've tried both with and without bundling a JRE into the installer
  • We've tried the completed install package on multiple windows machines
The version of AI we are using is 3.6.1, running it on a Windows XP SP2 machine. This is the same machine and the same install of AI we have used to successfully produce functioning installers before. As far as we can tell, we are doing everything exactly the same way we did the last time we were using Advanced Installer.

Any advice appreciated! Thanks!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Could not find the main class error

Hi,

Please check the INI file used by the Java Launcher. After you install the package open this INI in a text editor and check the "Main Class" and "Class Path" information to see if its correct.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”