Ich verwende IDL, um Java-Klassen zu kompilieren. Als ich versuchte zu kompilieren, sagte es, dass es Werttyp nicht erkennt. Hier ist die Zusammenstellung Befehl, Antwort und einen entsprechenden Code:IDL-Compiler erkennt Werttyp nicht
"C: \ Programme \ Java \ jdk1.8.0_121 \ bin \ idlj.exe" -fall StockMarket.idl
Erwartet einer der typedef'
Struktur‘ union'
enum 'const'
Ausnahme' readonly'
Attribut 'oneway'
float' double'
long 'short'
unsigned' char'
wchar 'boolean'
Oktett' any'
string 'wstring'
'::'
Leere' ValueBase'; encountered
Valuetype'. StockInfo Valuetype {
Modul 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();
};
};
Veröffentlichen Sie die Schnittstelle, die Sie kompilieren. – duffymo
Ich sehe nicht, wie die gesamte Schnittstelle notwendig ist, aber sicher. – Hiken