I am trying to execute a Java with Spring application from console/DOS prompt. Here are the steps I've followed:
- Downloaded spring-framework-3.1.0.RELEASE and unzipped it as well.
- Created a folder called 'springlib' on F:.
- Copied all the files under the folder - F:\spring-framework-3.1.0.RELEASE\dist to F:\springlib
- Copied all the files under the folder - F:\spring-framework-3.1.0.RELEASE\projects\spring-build\lib\ivy to F:\springlib
Created a folder F:\springtest and placed below Java program in it:
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
public class BillRunner { public static void main(String[] args) { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); System.out.println(context); } }
Tried to compile the program as shown below:
F:\springtest>javac -cp F:\springlib* BillRunner.java javac: invalid flag: F:\springlib\commons-httpclient.jar Usage: javac use -help for a list of possible options
- Why am I getting such error? What is the solution?