• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can you answer this????

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic