Running a java device server

I'm working on a project how to read data from the arduino board by the serialline, first thing i define my class with pogo and save it into a special folder when im trying to compile it with the terminal by the command
"javac ArduinoLink.java" i find a lot of errors for exemple :
package org.tango.utils does not exist the majority of errors package dont exist , if there's a link on how to run a device server it will be so helpful ?
Hi Faissal
To compile (or run) a Java device server, you need to export the environment variable CLASSPATH.
Where CLASSPATH contains at least JTango.jar.

Pascal
Another approach is to use single executable jar. This means to assemble all the dependencies into a single jar with defined main class. This way Tango Java server can be launched like this:


java -jar YouTangoServer.jar ${INSTANCE, aka development or sys}

You can give a try to this project: MStatusFacade

Clone and build it:


$> git clone https://github.com/tango-controls/MStatusFacade.git
…
$> cd MStatusFacade
$> mvn package -Psingle-executable-jar
$> java -jar target/MStatusFacade-1.2-SNAPSHOT.jar develoment

The output must look like this:

exception message is: IDL:Tango/DevFailed:1.0
Error Level 0:
         - desc: device dserver/mstatusfacade/develoment not defined in the database   hzgxenvtest.desy.de:10000 !
         - origin: DataBase::ImportDevice()
         - reason: DB_DeviceNotDefined
         - severity: ERROR

Error Level 1:
         - desc: Cannot execute command DbImportDevice on sys/database/2
         - origin: Connection.command_inout()
         - reason: TangoApi_CANNOT_EXECUTE_COMMAND
         - severity: PANIC

ERROR 2017-03-14 11:00:36,593 [Thread-0 - ] org.tango.server.events.EventManager.<init>:119 - ControlSystem/EventBufferHwm property is not a number:

Note that I do not have MStatusServer defined in my Tango Database so this output is pretty fine. It indicates that server actually starts!
i set the Classpath to a JTango.jar file so it works , but another problem appears when i want to run it "could not find or load main class " i try to write "java PACKAGENAME.CLASSNAME" it doesn't work
Try to add current location to the class path:


java -cp .:${CLASSPATH} ArduinoLink
 
Register or login to create to post a reply.