Re: java CLASSPATH Environement var



Abdelhalim MIMOUNI wrote:
And my command line command is a follow:

D:\DOCUME~1\MASTERPOINT\My Documents\Cours\Java\Pers
Teach\Prope_Obj\myPackage>set CLASSPATH=.;D:\DOCUME~1\MASTERPOINT\My
Documents\Cours\Java\Pers Teach\Prope_Obj\myPackage;



Abdelhalim,

The problem is that you are including the name of the package in the CLASSPATH. The javac and java programs will append the package name to the CLASSPATH entries. So what you want is:

D:\DOCUME~1\MASTERPOINT\My Documents\Cours\Java\Pers
Teach\Prope_Obj\myPackage>set CLASSPATH=D:\DOCUME~1\MASTERPOINT\My
Documents\Cours\Java\Pers Teach\Prope_Obj;

HTH,
Ray

--
XML is the programmer's duct tape.
.



Relevant Pages

  • Re: Dealing with packages UNIX
    ... Everything has the same package name in teh same directory. ... ALso when my web app runs it is using an older version of the class file taht wont compile even afer I did a rm *.class and replaced them with the javac *.java. ... javac needs a defined sourcepath to work. ...
    (comp.lang.java.programmer)
  • Re: java packages
    ... Using the following to compile manually. ... javac -classpath %PROD_CLASSPATH% CSDSMsg.java javac -classpath %PROD_CLASSPATH% DBS.java javac -classpath %PROD_CLASSPATH% RunDBS.java javac -classpath %PROD_CLASSPATH% XSS.java ... Common Java package name nomenclature is to use all ... The source and class files are to all be in same directory DBS_Intercept ...
    (comp.lang.java.programmer)
  • Re: If . is in classpath doesnt that pull in classes in the current folder?
    ... I have seen the package stuff in action in a different example from "Thining in Java" so I understand it a little better now. ... >> compiled MIMEType.java that a folder standalone was not made. ... the -d option to javac will tell the compiler where to put the ...
    (comp.lang.java.help)
  • Re: Issues with package declarations
    ... create the package subdirectory for you and to instantiate a class ... object in thisisatest). ... file does not contain class NullTest ... javac forpackagetest/NullTest.java ...
    (comp.lang.java.programmer)
  • Re: how to compile this?
    ... I am having a problem compiling Main.java ... javac -classpath foo.jar Main.java, ... Why isn't there a package for Main? ... Can you show us source code for Main? ...
    (comp.lang.java.help)