2017-06-26 6 views
0

J'utilise IDL pour compiler des classes Java. Quand j'ai essayé de compiler, il a dit qu'il ne reconnaît pas le type de valeur. Voici la commande compilation, réponse et code correspondant:Le compilateur IDL ne reconnaît pas le type de valeur

"C: \ Program Files \ Java \ jdk1.8.0_121 \ bin \ idlj.exe" -fall StockMarket.idl

prévue l'un des typedef' struct » union' ENUM 'const' exception' readonly' attribut 'oneway' float' double' long 'short' non signé' char' wchar 'boolean' octet' any' chaîne 'wstring' '::' vide' ValueBase'; encountered valuetype'. valuetype StockInfo {

Module {Stockmarket

exception UnknownSymbol { 
    string symbol; 
}; 

typedef string StockSymbol; 

typedef sequence<StockSymbol> StockSymbolList; 

interface StockServer { 
    float getStockValue(in StockSymbol symbol) raises (UnknownSymbol); 

    StockSymbolList getStockSymbols(); 

    valuetype StockInfo { 
     public StockSymbol name; 
     public float value; 

     string toString(); 
    }; 

    sequence<StockInfo> getStockInfo(); 
}; 

};

+0

Affichez l'interface que vous compilez. – duffymo

+0

Je ne vois pas comment l'interface entière est nécessaire, mais sûr. – Hiken

Répondre

0

Apparemment, la définition des types de valeurs doit être en dehors des interfaces. Beats moi pour savoir pourquoi.