In this study we apply a variant of a recently proposed linear subspace method, the Neighbourhood Component Analysis (NCA), to the task of hyperspectral classification. The NCA algorithm explicitly utilizes the classification performance criterion to obtain the optimal linear projection. NCA assumes nothing about the form of each class and the shape of the separating surfaces. In some cases we would like to weight the penalty function for different types of misclassifications of the algorithm. A modification of the NCA cost function is introduced for this case. Experimental studies are conducted on hyperspectral images acquired by two sensors: the Airborne Visible/Infrared Imaging Spectroradiometer (AVIRIS) and AISA-EAGLE. Experimental results confirm the superiority of the NCA classifier in the context of hyperspectral data classification over methodologies that were previously suggested.