Re: idl to java [message #58543] |
Sun, 03 February 2008 11:42  |
skymaxwell@gmail.com
Messages: 127 Registered: January 2007
|
Senior Member |
|
|
i take example little change it
FUNCTION helloworld::INIT,title
self.title=title
self->MakeCurrent
RETURN, 1
END
PRO helloworld__define
struct = {helloworld, $
inherits IDLitDirectWindow, $
title:'' $
}
END
pro main
a=OBJ_NEW('helloworld','from idl')
a->DRAWPLOT
end
PRO helloworld::DRAWPLOT
x=indgen(201)*0.1
y=sin(x)
plot,x,y,TITLE=self.title
END
then i run IDLEXBR_ASSISTANT procedure. I combines export different
properties and methods
created java file and make class file.
Then create java file and class file from it
package helloworld;
import com.idl.javaidl.*;
public class helloworld_example extends helloworld
implements JIDLOutputListener
{
private helloworld hwObj;
// Constructor
public helloworld_example() {
hwObj = new helloworld();
hwObj.createObject();
hwObj.addIDLOutputListener(this);
hwObj.executeString("print, 'Hello World'");
}
// implement JIDLOutputListener
public void IDLoutput(JIDLObjectI obj, String sMessage) {
System.out.println("IDL: "+sMessage);
}
public static void main(String[] argv) {
helloworld_example example = new helloworld_example();
example.DRAWPLOT();
}
}
so ...when i run i crush my JDK 1.6 :(((
so how export graphics to Java ?
Thanks
|
|
|