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!

ivanachukapawn
Posts: 4
Joined: Fri Feb 17, 2006 8:13 pm
Location: Northern Virginia, USA

cannot find main class RouterCollaborationConfig/Test2

I created an installer for a Java Swing app and had it created in the same directory as my class files. The class to execute is called Test2. This class and all the classes in the RouterCollaborationConfig directory are in package RouterCollaborationConfig. When I run the .exe file created by the installer software, I get

cannot find main class RouterCollaborationConfig/Test2

Why doesn't this work?

Thanks in advance for any help given on this problem.

John Davis
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

You need to add all the directories that contain ".class" files to the ClassPath. In the "Settings" tab of the "Java Products" page, click the "Folder" button and add the necessary folders.

As an observation, if your Java application is organized as below:

Code: Select all

- JavaApp
   - PackageDir1
       - File1.class
       - File2.class
   - PackageDir2
       - File3.class
       - File4.class
   - readme.txt
   - (no class files here) 
Then, you would also have to add the "JavaApp" folder to the ClassPath, even if it does not contain any ".class" files.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
ivanachukapawn
Posts: 4
Joined: Fri Feb 17, 2006 8:13 pm
Location: Northern Virginia, USA

cannot find main class RouterCollaborationConfig/Test2

I built a new installation for this java application and clicked on Java Project. The installation directory was already in this list.
There were no subdirectories involved, everything is contained in APPDIR which is what was listed in the Java Projects list.
I installed the application and ran the .exe which produced the same error message - cannot find main class RouterCollaborationConfig/Test2
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

This is how how package should be organized:

1. In the Files and Folders page:

Code: Select all

- Target Computer
    - Application folder
        - RouterCollaborationConfig
            - Test2.class
            - (other class files from this package)
        - Your Product.exe
        - Your Product.ini
2. The Java Products page -> "Settings" tab -> "Classpath" list should look like this:

Code: Select all

APPDIR
If your package is organized as described above and you are still getting the error you mentioned, please send the AIP file to support at advancedinstaller dot com so I can determine the cause of the problem.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
ivanachukapawn
Posts: 4
Joined: Fri Feb 17, 2006 8:13 pm
Location: Northern Virginia, USA

well, thats the problem

my files and folders looks like this:

Target Computer
Application Folder
Test2.class
etc.
Application Folder shortcut
etc.

I'll try pointing it to the directory above.
ivanachukapawn
Posts: 4
Joined: Fri Feb 17, 2006 8:13 pm
Location: Northern Virginia, USA

files and folders looks ok now, but still can't find Test2

I sent you the aip file

Return to “Common Problems”