can't find main java - Advanced Installer Community
thomasengels
Posts: 1
Joined: Sat Nov 23, 2013 2:22 pm

can't find main java

This problem has been posted several times by other users, but never has there been a solution given?
Why is that? I follow the tutorial on how to make a installer for java. Everything seems fine until you start your exe. It just fails with the message that it can't find the main class.
The solution given is always "send your aip file", is their no other advice that can be given? Executing the jar file doesn't give any trouble what so ever, but when you try it professionaly with an installer, it fails!

please help.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: can't find main java

Hello Thomas and welcome to Advanced Installer forums,

This is generic error and can be caused by various reasons. Basic guidance to avoid this is to:
-> Add all the JAR files from the "lib" subfolder to "Classpath" in the Java Products page. Use the "Folder" button to add a path (containing ".class" files) to the "Classpath" parameter of your Java Application.
-> Enable "Run as administrator" option from the same tab as "Classpath" (Settings tab) if your application requires administrator privileges to run.

If this is a JavaFX application, there are some proposed solutions in the following threads:
can't find main class - JavaFX Application
Installer for JavaFX applications

If the above information doesn't help, please try to replicate this on any clean test machine from the command line. If the problem persists, please send us a small test case to support at advancedinstaller dot com so we can investigate.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”