Since you wrote "package src;" at the top of your class, you will have to run the class by referring to it as "src.Normalize". So to run the class from the Cluster directory, try: java -cp build src.Normalize So you're pointing java to the directory above the beginning of your package hierarchy (you only have one level in your package "src") and then refer to the class using the package name "dot" class name. So if you had more levels in your package like "package com.pizzahut.util;" then you will refer to your class as "com.pizzahut.util.Normalize" in order to run it.

In this case the class name is src.Normalize and the class files are stored under the "build" folder, so java -cp build src.Normalize should get it running. However, calling your package "src" is not perhaps the most descriptive name you could come up with. In fact it is misleading and could cause confusion with the real source directory "Cluster/src". The convention is to use your domain name (in reverse order) followed by a descriptive name for the package. For example, if you owned the domain name "vbose.com" you might like to place your class in the package "com.vbose.cluster". Talking of names, the name of the class "Normalize" appears to describe an action (method) rather than an object / class? Regards,David