usage: tlb2java [-q] [-d dest_dir] [options] {-java|-jni|-hjni} typelib [typelib ...]
    -q                  Sets the quiet flag.
    -prefix_cpp         Prefixes cpp filenames with library name
    -d <dest_dir>       Sets the output directory.
    -java               Generate java files.
    -jni                Generate jni cpp files.
    -hjni               Generate jni h files
    -xml                Generate xml files.
    -check_apartment    Generate thread apartment checks.
    -skip_coclasses     Don't generate code for coclass'es.
                        Useful to break a chain of imports caused by
                        coclass'es that implement an interface from another tlb.
    -hide_restricted    Don't generate [restricted] types.
    -hide_hidden        Don't generate [hidden] types.
    -rename_package <old> <new> Renames the package, default is the typelib name.
    -rename <old> <new> Rename a property or method to match a #import rename
    -missing <param> <attribs> Tlb is missing an attribute such as [out].
                        <param> is in the form of Interface.Method.Param
    -jni_entry <text>   Insert <text> at start of every jni method.


mkdir src/com/moesol/bindings/wsh
tlb2java -q \
    -rename_package stdole com.moesol.bindings.platform_sdk.component_services \
    -rename_package IWshRuntimeLibrary com.moesol.bindings.wsh \
    -java -hjni -jni -d src \

Ant Example

<property environment="env"/>
<property name="jSegue.dir" value="C:/jSegue"/>
<property name="tlb2java" value="${jSegue.dir}/tlb2java"/>

<target name="tlb-gen-wsh" depends="prepare">
    <mkdir dir="${src.dir}/com/moesol/bindings/wsh"/>
    <exec executable="${tlb2java}"
          os="Windows NT,Windows 2000,Windows XP" failonerror="true">
        <arg line="-q"/>
        <arg line="-rename_package stdole com.moesol.bindings.platform_sdk.component_services"/>
        <arg line="-rename_package IWshRuntimeLibrary com.moesol.bindings.wsh"/>

        <arg line="-java -hjni -jni"/>
        <arg line="-d ${src.dir}"/>
        <arg line="-check_apartment"/>
        <arg line="${env.SYSTEMROOT}/System32/wshom.ocx"/>

$Id: usage.html 3769 2007-06-08 19:06:43Z hastings $