EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: JCA using problem
From: "Guobao Shen \(KEK\)" <[email protected]>
To: '鲍春雷' <[email protected]>, <[email protected]>
Date: Wed, 28 Nov 2007 11:32:02 +0900
Hi Bao,
You need set some environment parameter properly for JCA in
JCALibrary.properties file before you start using it.
There is a tutorial under doc directory if you downloaded the source code.
Some some detail explanation can be found in that file about how to
setJCALibrary.properties .

BTW: Which OS do you use, Linux, Win/XP, ...?
Do you compile the JCA library from source code by yourself?

Guobao Shen

-----Original Message-----
To: [email protected]
Subject: JCA using problem

                                       Hello,all
	I am using JCA to do some experment.But the first program can not
run.The error message is:java.lang.IllegalStateException: Context not
initialized.
	My environment:
	JDK 1.5
	JCA 2.3.1
	EPICS 3.14.8

	The program:
import gov.aps.jca.Channel;
import gov.aps.jca.Context;
import gov.aps.jca.JCALibrary;

public class test {
	public static void main(String[] args) {
		 try {
			  JCALibrary jca= JCALibrary.getInstance();
		      Context ctxt=
jca.createContext(JCALibrary.JNI_THREAD_SAFE);
		      ctxt.printInfo();
              Channel ch= ctxt.createChannel("light");
			  ctxt.pendIO(5.0);
		      ch.printInfo();
		     ch.destroy();
		      ctxt.destroy();
		    } catch(Exception ex) {
		      System.err.println(ex);
		    }
	}

}

BaoChunlei
Control Group,IHEP



References:
JCA using problem 鲍春雷

Navigate by Date:
Prev: JCA using problem 鲍春雷
Next: Re: SoftIOC console access under Windows? Mark Bennett
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: JCA using problem 鲍春雷
Next: RE: JCA using problem Guobao Shen (KEK)
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·