Compiling Java files with the dependent jars using windows Cmd -
i have 5 .java files in src folder , many dependent jars in lib folder while compiling .java files jars facing error as,
src\grapher.java:12: error: package org.jfree.chart not exist import org.jfree.chart.*;
my directory sturcture is,
c:\grapher\src*.java
c:\grapher\lib*.jar
i using commond javac -cp .;lib/*.jar src/*.java
- make sure have jfreechart jar in lib folder
- you have wrap arguments of
-cp
brackets - you didn't provide sourcepath.
try this:
javac -classpath "lib/*" -sourcepath src src/*.java
note: work if java files located in src
folder. in case if have package declaration in classes have specify package structure.
eg: src/com/company/*.java
Comments
Post a Comment