Quote: Originally Posted by
nation 
Vicne, i need your advice
Oops, sorry, I don't have much time to hang around here anymore...
I'll make a long answer to compensate for your waiting time :-)
Quote:
I am testing to use an ipaq to run the java CDCemu version
my ipaq (rx1950) has windows mobile 2005, insignia jeode java virtual machine
and i found on
http://republika.pl/mho/java/comm/ the rxtx libraries for Windows CE and the IPAQ
i tried to modificate the TLCDCEmu.bat to adapt it to the windows CE example(if yo download the RXTX_iPAQ_0211.zip file inside comes all the installation instructions and a .lnk file similar to the .bat used on cdcemu)
yourapp.lnk
54#\windows\evm.exe -Djeode.evm.console.local.keep=true -cp \windows\Programs\yourapp.jar;\windows\lib\comm.ja r;\windows\lib\jcl.jar
YourApp -V
TLCDCEmu.bat
java -cp ./classes;./lib/RXTXcomm.jar org.tlcdcemu.main.TLCDCEmu
pause
i adapted the file in the next form:
54#\windows\evm.exe -Djeode.evm.console.local.keep=true -cp \classes;\windows\lib\comm.jar;\windows\lib\jcl.ja r TLCDCEmu -V
but i only obtan an error: java.Lang.NoClassDefFoundError:TLCDCEmu
That is absolutely normal.
For a java program, the command line typically includes the following things :
- the java virtual machine (JVM) executable (looks like 54#\windows\evm.exe in your case)
- some options to the JVM
- the so-called "classpath", which tells the JVM where to find the code to execute, called classes (libraries or your own code). They can be either plain directories or zipped in "jar" files. In our case, the classpath needs to include the rxtx library and the actual emulator part
- the name of the "main" class to start (entry point of your program). This class can be part of a "package" (the "org.tlcdcemu.main" prefix in our case). Some prefer to write code where the entry point is not in any package like in your example, but I don't :-)
- some options to the program you want to run
So, in our case, I think the line would be something like :
54#\windows\evm.exe -Djeode.evm.console.local.keep=true -cp .\classes;\windows\lib\comm.jar;\windows\lib\jcl.j ar org.tlcdcemu.main.TLCDCEmu
It looks like the "-Djeode.evm.console.local.keep=true" option of the Jeode JVM instructs it to keep its output on screen, which is useful when debugging. When it works you can remove it...
For the classpath, first note the dot (.) before \classes. It tells the JVM that it has to search the classes subdir *relative* to the place where your lnk file is. You can replace it with a full path like \windows\programs\TLCDCEmu\classes - without a dot at the start this time - if you like (depending on where you placed the files)
The Rxtx library I had on PC included the JCL library if I'm not mistaken, but if they are separate in your distribution, you have to include both.
And finally "org.tlcdcemu.main.TLCDCEmu" is the class to start
Quote:
Can someone helpme? do i have a syntaxis error? or its more complicated and do i have to modificate the java source code?
Normally, Java is "write once, run anywhere", so no modification should be needed. In this particular case however, RxTx history has made them change the package name between versions from "javax.comm" to "gnu.io", which makes different versions incompatible unless you modify the calling code. I don't know which package is in use in the version of RxTx you got, but let's try with that first, and don't hesitate to tell us how it's going.
Vicne