Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Diane Collins   on Jul 16 In Java Category.

  
Question Answered By: Baylen Smith   on Jul 16

1. Change path to ur cur dir using "cd" command
2. set classpath to all lib files  & dont forgot to
add ur cur dir also "."

set classpath=%classpath%;.;
(or)
set classpath=%classpath%;C:\java\KnowledgeBase;

use the following syntax to compile  & run

syntax:
javac -d <dir_name> <source_name.java>
ex:
javac -d C:\java\KnowledgeBase *.java

syntax:
java <package>.<class_name>
ex:
java knowledgebase.KnowledgeBase

Share: 

 
 
Didn't find what you were looking for? Find more on Compiling and running java programs in packages Or get search suggestion and latest updates.


Tagged: