The cancer of liver, which is the leading cause of cancer death, is commonly diagnosed by comparing the changes of gray level of liver tissue in the different phases of the patient's CT images. To aid the doctor in reducing misdiagnosis or missed diagnosis, a fully automatic computer-aided diagnosis (CAD) system is proposed to diagnose hepatocellular carcinoma (HCC) using convolutional neural network (CNN) classifier. The automatic segmentation and classification are two core technologies of the proposed CAD system, which are both realized based on CNN. The segmentation of liver and tumor is implemented by a fully convolutional networks (FCN) based on a fine tuning VGG-16 model with two additional 'skip structures' using a weighted loss function which helps to solve the problem of inaccurate tumor segmentation caused by the inevitably unbalanced training data. HCC classification is implemented by a 9-layer CNN classifier, whose input is a 4-channel image data constructed by combining the segmentation result of FCN with the original CT image. A total of 165 venous phase CT images including 46 diffuse tumors, 43 nodular tumors, and 76 massive tumors are used to evaluate the performance of the proposed CAD system. The classification accuracy of CNN classifier for diffuse, nodular and massive tumors are 98.4%, 99.7% and 98.7% respectively, which are significantly improved in contrast with the traditional feature-based ANN and SVM classifiers. The proposed CAD system, which is unaffected by the difference of preprocessing method and feature type, is proved satisfactory and feasible by the test set.