Page 1 of 1
Java LCD control?
Posted: Tue Oct 22, 2002 6:31 pm
by SiGmA_X
I saw the Java sample on the MO download page, and I would like to know how to install javax.comm

I am just getting in to Java (Taking High School & College classes

) and so it would be really cool to learn to write my own app for my LCD in Java...
So, how do I install the javax.comm librarys? (Could someone give me a decent guide, because the readme is too sparse for someone who has never used a custom lib..)
Thank you

Posted: Mon Oct 28, 2002 5:10 pm
by PatO
Piece of cake.
javax.comm is an optional package for J2SE (Standard Edition) from sun. You need to download it... Do a search on their site for a list of various optional packages. Although, I think it's included in the Enterprise Edition, but don't quote me.
Or, just click this link for the download page.
http://java.sun.com/products/javacomm/
Then, just copy the code from the java example, paste into a file named LCDControl.java, and run as you normally would.
Posted: Mon Oct 28, 2002 7:14 pm
by SiGmA_X
Okay, I just downloaded it, and attempted to install it...
I still can't get it to import the file.. I cleared my CLASSPATH when I installed (I used command prompt, and messed up the command :-\) so maybe I'm missing something that is needed...
BTW, I'm on AIM/ICQ/MSN/Y! right now, so message me there if you can

Posted: Mon Oct 28, 2002 7:53 pm
by PatO
Ya, well no wonder it doesn't work....
Re-install java and the add-on.
If your classpath is correct, javax.comm should automatically be imported when it sees the include statement. I don't have the java sdk on this machine, so I can't tell you off hand what the classpath should be. A re-install should fix that for you.
Since javax.comm is built into java (and added to your classpath), you shouldn't need to use the "classpath" parameter on your javac or java commands.
Then, compile your class like so: javc LCDControl.java
and run it like so: java LCDControl params...
(sorry, I don't use AIM/ICQ/MSN/Y!)
Posted: Mon Oct 28, 2002 9:14 pm
by SiGmA_X
Okay, I'll go get the latest Java

Posted: Tue Oct 29, 2002 2:00 am
by Henry
good luck

Posted: Tue Oct 29, 2002 10:31 am
by SiGmA_X
I re-installed Java, and it worked fine. But I couldn't get the javax.comm.* to work, still...
Could you please send me your CLASSPATH that pertains to Java?
Thankx.
Posted: Tue Oct 29, 2002 8:11 pm
by PatO
Okay, I apologize for being so abrupt before - it turned out to be more difficult than I thought! I'm running Win2k - different versions of Windows tend to handle classpaths differently, namely, Micro$oft has been more thorough at disabling classpaths in newer versions of Windows!
When I registered the comm.jar in the CLASSPATH variable, it didn't take. I had to add it to the command. Like so (run in the same folder as your compiled BlackBox.class:
java -classpath BlackBox.jar;c:\java\lib\comm.jar BlackBox
That is assuming, of course, that you've copied javax.comm.properties, win32com.dll, and comm.jar to their respective folders and have jse(sdk) installed properly.
There is an even slicker way to add files to a classpath, however. On the fly in Batch Files! This way, you can run multiple versions of java and specify different classpaths for different programs, and even keep the classpath down to the darn Windows limitations. This is done like so (place in a file called something like runme.bat):
Code: Select all
@ECHO OFF
set THEPATH=%CLASSPATH%;BlackBox.jar;c:\java\lib\comm.jar
java -classpath %THEPATH% %1
Then, run it like so: runme BlackBox
Presto!
If this doesn't work, let me know what version of Windows you're running and what the error is (cut and paste).
Good luck!
Posted: Sun Mar 16, 2008 7:10 pm
by ee06u125
hi,
where is this java code?
I've got javax.comm and a load of other libraries installed and wrote my own class but cant seem to get anything displayed on the lcd. I know the lcd is working because its fine with lcd smartie. I just need to look at some example code to see what im doing wrong.
thanks.
*btw its for a project, ive made an rss reader in java incl. gui and i want to send selected info to the lcd, using java.
Posted: Mon Mar 17, 2008 7:16 am
by Ray
The Java code moved around quite a bit, its current location is
here, good luck with your project!