Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can you answer this????  RSS feed

 
K Kiran Kumar
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a file called 'test.java' in d:\a\b\c\d\test.java.
test.java has code

package c.d;
import r.s.*; //if this statement is wrong please correct this.
public class test
{
//some code that uses ex.java method
}


I have one more file called ex.java in e:\p\q\r\s\ex.java.

ex.java has code

package r.s;
public class ex
{
// some code with a simple method
}

java bin dir is in f:\java1.4\bin

My question is how to compile those two files from g:\> drive
Please give me the commands to compile the two files. I had tried but I got the error unable to read file.

Regards,
Kiran.
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can well use javac command by specifying the entire path
javac e:\p\q\r\s\ex.java

however to compile test.java you need to set the CLASSPATH to e:\p\q
and then you can use the javac to compile like
javac f:\a\b\c\d\test.java


PS: This forum is for Enterprise Java Beans. Do post java questions in the Java (begineer|advanced) forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!