How to specify main-class in SCons Java build?

591 Views Asked by At

I have the following SConscript file:

Java(target='classes', source='.');
Jar(target='test.jar', source='classes')

The problem is that I'm unsure how to set the main-class attribute and it's not covered in the SCons documentation. Does anyone know how to do this?

1

There are 1 best solutions below

0
On BEST ANSWER

I figured it out. Here's my updated SConscript file:

Jar(target='Observer',
    source=['Observer.java',
            'Manifest.txt'])

Note that the Manifest.txt file can have any name, but the first line in it must be:

Manifest-Version: