20060206-java-api.txt The SDK docs say you can use various languages to control the servers. But they all operate through dll's, which pretty much leaves java as the only linux alternative. Working in /csb/staff/d0/perlo/rimage. Copied the SDK .jar files from /eve/www/csb_home/userguides/sysresource/offline/rimage/SDK/linux/lib/ to /csb/staff/d0/perlo/rimage/lib. SDK doc says must use JDK >= 1.4.2-b21 On corevm3, installed: java-1_5_0-sun-1.5.0_03-2 java-1_5_0-sun-devel-1.5.0_03-2 java-1_5_0-sun-demo-1.5.0_03-2 jpackage-utils-1.6.3-6 rimage/lib> cd /csb/staff/d0/perlo/rimage/lib rimage/lib> foreach j (*.jar) foreach? unzip $j foreach? end Tests: in /csb/staff/d0/perlo/rimage/tests/ test_00_hello.java -- simple hello world: rimage/tests> javac test_00_hello.java rimage/tests> java test_00_hello Hello, World. test_01_rimlib.java -- Copied fragments from sample directory JavaSample2.java. Requires that this directory contain: UserData.java and links: com -> ../lib/com javax -> ../lib/javax/ org -> ../lib/org progress -> ../lib/progress test_01_rimlib.java contains all the imports listed in JavaSample2.java. rimage/tests> javac test_01_rimlib.java UserData.java rimage/tests> java test_01_rimlib Failed to setup connection with localhost at port 2506 The application will be shut down immediately. Please try again. Modify UserData.java rimage/tests> diff UserData.java UserData.java.NC < String USER_HOST = "elijah.core"; > String USER_HOST = "localhost"; rimage/tests> javac test_01_rimlib.java UserData.java rimage/tests> java test_01_rimlib Program hangs. Tried rimage/tests> telnet elijah 2506 Required zone-alarm intervention on elijah. Permanently enabled. Now, can telnet. (When I enter something, elijah closes connection). rimage/tests> java test_01_rimlib Connection with elijah.core at port 2506 succeeds. test_02_rimlib.java -- Slightly extended fragment. Connects and disconnects cleanly. rimage/tests> javac test_02_rimlib.java rimage/tests> java test_02_rimlib test_03_rimlib.java -- Connects; registers event handlers; deregisters handlers; disconnects. Includes stubs for event handlers. test_04_rimlib.java -- Adds the most basic production order. Sends local file printonly_01.xml to the rimage to print a label. Label file must already be on the rimage PC: D:\images\printonly_01.btw Reads production order from printonly_01.xml test_05_rimlib.java -- Adds status checking -- In order to get it to work, had to copy all the .dtd files and modify UserData.java: String WORKING_FOLDER = "File:///csb/staff/d0/perlo/rimage/XML/"; This allows the private function resetDTD (copied from Javasample2) to modifiy the XML status string from the server so that the function parseXML can find the dtd in order to parse the xml. test_06_rimlib.java -- Same, but sends datadisk_01.xml, for a production order. In datadisk_01.xml, which is based on the sample in the SDK guide, I changed to MergeSessions="false" (we are only writing one image). I left Type="Mode1" -- I don't know the implications of choosing mode2, XA_Form1, XA_Mixed or CD_I, which are other choices. I specified type=DVDR instead of CDR because I didn't have any printable CDRs. Failed. Server log on elijah shows: "Media type set for the autoloaders doesn't match the media type specified in the order." (note: trying to manually burn a DVD on elijah from QuickDisk produces the same problem -- obviously, the rimage needs to be configured so it knows it supports DVDs). In datadisk_01.xml, I changed DVDR back to CDR and removed the print action. Now, it seems to work. Found out how to set media type from CDR to DVDR on rimage. It is a pain in the neck on elijah. We will have to see if it can be done from the java API.