File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes General Computing and the fly likes TINIm400 SerialToEthernet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "TINIm400 SerialToEthernet" Watch "TINIm400 SerialToEthernet" New topic
Author

TINIm400 SerialToEthernet

Sofiene Hammad
Greenhorn

Joined: Mar 28, 2011
Posts: 9
Hi

I'm currently working on a project based on TINIm400, in the following project, I gotta develop a small applications hat provides data coming from a sensor in RS232 to a Host/Server in Ethernet. Therefor I decided to use the example provided by my microcontroller manufacturer called CommTester. This one sends from host on RS232 a data, and receives it by Ethernet, TINI's role is overally a bridge for both medias.

First of all, I had some issues compiling the program, but right after I found some netbeans stuff helping users to develop java codes which fit with TINI board. After what I wanted to execute this one on the Host. I had to pass an argument on the function so basically executing it from the DOS cmd with the following command :



As you can see my main function is Serial in the package serialtoethernet, in this package I have 4 files :
-Serial
-CheckData
-SerialAboutFrame
-other random file using the jswing library


So here is my problem during the execution command line :



It seems like from what I've seen on differents websites that this is a classpath problem. However I can't manage to solve it.
If you guys don't mind would it be possible for you to help me ?

Regards

Sofiène HAMMAD
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

I think that this is a problem with the package name. Somewhere, the class appears as simply Serial, but the actual name of the class is serialtoethernet.Serial. Usually this means that your classpath is set incorrectly. As an example, let's say that the class file is located at /some/path/serialtoethernet/Serial.class. The correct classpath entry to access the class is /some/path, but you most likely specified /some/path/serialtoethernet.

Looking at you post again, you are not giving a classpath/ So I suspect that your current directory is /some/path/serialtoethernet, try cd'ing back to /some/[ath.

NOTE: The whole thing could be in reverse! That is, the class name is really Serial, in which case you should cd into /some/path/serialtoethernet and run "java Serial ..."

BTW, this whole classpath and package relationship thing, and how they relate, is one of those things that many people initally think they understand until they run into a situation like you have, after which they have an "AHA!" moment after which many things suddenly make sense.


JBoss In Action
Sofiene Hammad
Greenhorn

Joined: Mar 28, 2011
Posts: 9
Ok thanks for the info. I just ran the .bat from a false directory. cheers !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TINIm400 SerialToEthernet
 
Similar Threads
TINIm400 timed read/write and thread management
Java - TINI board - Timed reading
Exception in thread "main"
TINIm400 module and timed reading
TINIm400 from sensor to database