Jump to content
Excelsior Forums
pkeller

Multi-component application with the main class in another component

Recommended Posts

Hi,

I am trying to follow the instructions for building a multi-component application. Generating the shared libs works fine, but the classes containing the main methods for the executables are in one of the JAR files that is already included in the shared library. I tried using a project file to generate an executable that did not contain a classpathentry like this:

-OUTPUTNAME=myexec
-CLASSABSENCE=HANDLE
-IGNOREMEMBERABSENCE+
-MAIN=path/to/class/with/main
!uses ./sharedLib.prj

but [tt]jc =p myexec.prj[/tt] gave me an error message:

#module not found "path/to/class/with/main"

I also tried adding a !module directive for the shared library, with the same result.

Can I use a class in another project for [tt]-MAIN[/tt], or do I have to split out the classes containing the main methods?

Thanks for any hints,

Peter.

Share this post


Link to post
Share on other sites

The main class should be placed in the EXE component.

A simple workaround is to create a fake main class that calls the required method from the DLL and add that class to the EXE's project

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×