[netcdf-java] convert a string to java code for netcdf writer

Dear All,
I would like to create netcdf files. I transport the following string to the 
java class where I build a  netcdf writer:
'Variable time; time = ncfile.addVariable(null, "time", DataType.Double, 
"time");'
The netcdf writer will not understand it because it is a string. Can someone 
suggest me a way to convert it to a java command?
Thank you for your help in advance!
Best regards,
Beata

Beáta Szabó-Takács Ph.D
Department of Atmospheric Matter Fluxes and Long-Range Transport
Global Change Research Institute CAS
Bělidla 986/4a
603 00 Brno
Czech Republic

+420 602 975 356
www.czechglobe.cz<http://www.czechglobe.cz>