Some PC vendors pre-install the JRE (Java Runtime Environment), some applications will do it for you, so you need to check whats there.
Method:
Start / Run... / Open: cmd
to get a 'C:\' window (windows command line aka 'dos box' prompt)
Enter: java -version
If you get the response:
'java' is not recognized as an internal or external command, operable program or batch file.
then you don't have any version of the JRE, so proceed to step 2.
If you hava JRE, you will get something like:
java version "1.5.0_03" Java(TM) 2 Runtime Environment (build 1.5.0_03-b07) Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)
Tcc (version 1.6 onwards) requires at least java version 1.5, so if you have a lower java level, it's best to upgrade as per step 2.
If you have java version 1.5 or above, skip step 2.
Method:
Visit the Java 'consumer site' at http://java.com
Press: 'Free Java Download' button. This autosenses your machine type (Windows, Solaris, Linux, Mac OS X).
Follow the instructions.
Once installed correctly, check at the command line by entering:
java -version
expect to see something like:
java version "1.6.0_02" Java(TM) SE Runtime Environment (build 1.6.0_02-b06) Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)
(Java Communications for Serial/Parallel ports)
Method:
As Sun have 'retired' this add-on, it's easiest to download the copy located in Yahoo Group [mergtcc] Files, folder: javacomm.
http://groups.yahoo.com/group/mergtcc/files/javacomm/javacomm20-win32.zip
Then unzip/extract from javacomm20-win32.zip to a folder.
Three files need to be copied from the javacomm folder, each to a specific, different, sub-folder of the JRE itself.
First, locate the JRE main folder: From 'My Computer' navigate to the Windows 'Program Files' folder and then to the 'Java' folder.
Likely 'Java' will only have one sub-folder.
Example: \jre1.6.0_02\
If there's more, identify the one that matches the version id in the current 'java -version' response that you got earlier.
This is the <JRE> base folder.
Second, copy the three required javacomm files as follows into the correct <JRE> sub-folders:
comm.jar - to <JRE>\lib\ext\
javax.comm.properties - to <JRE>\lib\
win32com.dll - to <JRE>\bin\
(for additional info see also the hints in section 4)
Method:
Check the Yahoo Group [mergtcc] Files area for a recent version of Tcc and download it, making sure that you save it as 'tcc.jar' (sometimes the download wants to call it tcc.zip!)
It's suggested that you place tcc.jar in a short named folder, eg create c:\Tcc\
You are advised to initially test Tcc with a very simple TCL file.
Create eg. 7-line q1.tcl via Notepad in eg c:\Tcc thus:
QtuCabs:
Q="emptycnf":Q1:Q2:Q3:Q4
Variables:
initialised
Actions:
WHEN initialised=0
DO initialised=1then, in Windows command line window:
cd c:\Tcc java -jar tcc.jar q1
Tcc will locate q1.tcl in the current directory/folder and it should launch a separate, persistent, Tcc GUI window.
Check that you don't have any of the error symptoms discussed in section 4.
All recent versions of Tcc include checks of the installed javacomm interfaces and useful messages.
Note that tcc will run OK even if you don't do any of the javacomm copies, but you won't be able to configure ANY network in Tcc.
Tcc menu Configure -> Network will need to be done before attempting to communicate with a QTU over a Serial port. A different test TCL file could be used for a RPC environment.
If the Serial port is accessed eg via a USB-to-Serial converter, you may need to install additional device driver software into Windows.
After a Tcc startup it uses javacomm to 'enumerate' all the Serial ports that the underlying Windows OS knows about. Restart Tcc if you 'hot add' an extra serial port.
The places to look for errors/warnings are:
The windows command line from whence Tcc was invoked,
The Tcc GUI 'log' sub-window (menu View -> Log, but likely will open automatically if there's any important message),
The current directory stderr.txt/stdout.txt files.
for example, if you haven't correctly installed the comm.jar file of javacomm correctly Tcc will report a warning in its log window:
cannot load javacomm library Place in extensions directory: <java install directory>/jre/lib/ext
and won't offer anything in the network Configuration window.
If you haven't installed the other javacomm files. correctly, Tcc won't find any Serial ports so the serial port selector in the Network configuration window will show:
Serial 1: No ports available 9600N8/1
and the log will show an error resembling:
No serial ports available Is the file: javax.comm.properties missing from D:\Program Files\Java\jre1.6.0_02\lib or the file: win32com.dll missing from D:\Program Files\Java\jre1.6.0_02\bin
If you have to repair any of this, please Exit and restart Tcc.
If something updates the java on your machine (possibly installing a new application) you might need to repeat the copying of the javacomm files.
A separate document explains the location and usage of various files that will be created during Tcc execution. Note particularly the important concept of a 'project sub-directory/folder' - A sub-folder named c:\Tcc\q1 will be created for the above example.