créer un type java à partir de fichiers idl
Hors ligneNico63 Le 30/04/2009 Ă  10:16 Profil de Nico63 Configuration de Nico63

Bonjour,

J'aimerais obtenir un type java à partir de fichiers .idl mais au moment d'appliquer javamaker je rencontre l'erreur :
' /usr/lib/openoffice/basis3.0/sdk/bin/javamaker.bin : init registries failed, check your registry files. '

Voici mon code example.sh  :


export OOoSDK_Home=/usr/lib/openoffice/basis3.0/sdk
export OOoSDK_BIN=$OOoSDK_Home/bin
export Workbench=/home/perrin/tmp/TestWorkbench
export Component=SomethingA

$OOoSDK_BIN/idlc  -C -O $Workbench/$Component/build/urd/org/openoffice -I $OOoSDK_Home/idl -I $Workbench/$Component/idl $Workbench/$Component/idl/org/openoffice/example/X$Component.idl

$OOoSDK_BIN/idlc  -C -O $Workbench/$Component/build/urd/org/openoffice -I $OOoSDK_Home/idl -I $Workbench/$Component/idl $Workbench/$Component/idl/org/openoffice/example/$Component.idl

$OOoSDK_BIN/regmerge $Workbench/$Component/rdb/thumbs.rdb /UCR $Workbench/$Component/build/urd/org/openoffice/$Component.urd
$OOoSDK_BIN/regmerge $Workbench/$Component/rdb/thumbs.rdb /UCR $Workbench/$Component/build/urd/org/openoffice/X$Component.urd

$OOoSDK_BIN/regview $Workbench/$Component/rdb/thumbs.rdb

$OOoSDK_BIN/javamaker -Torg.openoffice.example.XSomethingA -Torg.openoffice.example.SomethingA  -BUCR -O"$Workbench/$Component/build/urd/org/openoffice" -nD -X"opt/openoffice.org/ure/share/misc/types.rdb" -X"opt/openoffice.org/basis3.0/program/offapi.rdb" "$Workbench/$Component/rdb/thumbs.rdb"


Mes fichiers SomethingA.idl et XSomethingA.idl sont :

- SomethingA.idl :



#ifndef INCLUDED_ORG_OPENOFFICE_EXAMPLE_SOMETHINGA_IDL
#define INCLUDED_ORG_OPENOFFICE_EXAMPLE_SOMETHINGA_IDL


#include <XSomethingA.idl>

module org { module openoffice { module example {
    service SomethingA: XSomethingA;
}; }; };  

#endif


-XSomethingA.idl :



#ifndef INCLUDED_ORG_OPENOFFICE_EXAMPLE_XSOMETHINGA_IDL
#define INCLUDED_ORG_OPENOFFICE_EXAMPLE_XSOMETHINGA_IDL

#include <com/sun/star/uno/XInterface.idl>

module org { module openoffice { module example {
    interface XSomethingA {
        string methodOne([in]string value);
    };
}; }; };  

#endif



Merci d'avance
Hors ligneNico63 Le 12/05/2009 Ă  14:46 Profil de Nico63 Configuration de Nico63

Salut,

C'est bon ,mon fichier marche, je ne sais pas trop pourquoi. Donc voici mes bouts de code si ca peut vous etre utile:

XSomehtingA.idl


#ifndef __com_sun_star_test_xsomethinga_idl__
#define __com_sun_star_test_xsomethinga_idl__

#include <com/sun/star/uno/XInterface.idl>

module com { module sun { module star { module test {
    interface XSomethingA {
        string methodOne([in]string value);
    };
}; }; };  };

#endif


SomethingA.idl


#ifndef __com_sun_star_test_somethinga_idl__
#define __com_sun_star_test_somethinga_idl__

#include <com/sun/star/test/XSomethingA.idl>

module com { module sun { module star { module test {
    service SomethingA: com::sun::star::test::XSomethingA {};
}; }; }; };  

#endif


mon fichier shell


export OOoSDK_Home=/usr/lib/openoffice/basis3.0/sdk
export OOoSDK_BIN=$OOoSDK_Home/bin
export Workbench=/home/perrin/tmp/TestWorkbench
export Component=SomethingA

$OOoSDK_BIN/idlc  -w -O $Workbench/$Component/build/urd/com/sun/star/test -I $OOoSDK_Home/idl -I $Workbench/$Component/idl $Workbench/$Component/idl/com/sun/star/test/X$Component.idl

$OOoSDK_BIN/idlc  -w -O $Workbench/$Component/build/urd/com/sun/star/test -I $OOoSDK_Home/idl -I $Workbench/$Component/idl $Workbench/$Component/idl/com/sun/star/test/$Component.idl

$OOoSDK_BIN/regmerge types.rdb /UCR $Workbench/$Component/build/urd/com/sun/star/test/$Component.urd
$OOoSDK_BIN/regmerge types.rdb /UCR $Workbench/$Component/build/urd/com/sun/star/test/X$Component.urd

$OOoSDK_BIN/regview types.rdb

$OOoSDK_BIN/javamaker -Tcom.* -nD -Gc -BUCR -O $Workbench/$Component/build $Workbench/$Component/types.rdb


++

(par contre je ne sais pas comment mettre resolu...)
Vous avez résolu votre problème avec VIC ? Faites-le savoir sur les réseaux sociaux !
Vulgarisation-informatique.com
Cours en informatique & tutoriels