.classpath file instead of the CLASSPATH Environment variable. - Java

This is a discussion on .classpath file instead of the CLASSPATH Environment variable. - Java ; Writing a java client application in Eclipse, and I would like to call it at the command line. I noticed that the IDE generates a .classpath file in the project directory. Is there a way to call the program at ...

+ Reply to Thread
Results 1 to 3 of 3

.classpath file instead of the CLASSPATH Environment variable.

  1. Default .classpath file instead of the CLASSPATH Environment variable.

    Writing a java client application in Eclipse, and I would like to call
    it at the command line. I noticed that the IDE generates a .classpath
    file in the project directory. Is there a way to call the program at
    the command line and utilize the .classpath file in lieu of setting
    the classpath environment variable?


  2. Default Re: .classpath file instead of the CLASSPATH Environment variable.

    dontspammenow@yahoo.com wrote:
    > Writing a java client application in Eclipse, and I would like to call
    > it at the command line. I noticed that the IDE generates a .classpath
    > file in the project directory. Is there a way to call the program at
    > the command line and utilize the .classpath file in lieu of setting
    > the classpath environment variable?


    No.

    But generate a jar file with a Class-Path directive in the
    manifest.

    Arne

  3. Default Re: .classpath file instead of the CLASSPATH Environment variable.

    dontspammenow@yahoo.com wrote:
    > Writing a java client application in Eclipse, and I would like to
    > call
    > it at the command line. I noticed that the IDE generates a
    > .classpath
    > file in the project directory. Is there a way to call the program
    > at
    > the command line and utilize the .classpath file in lieu of setting
    > the classpath environment variable?


    Using the Bourne shell:

    java -classpath `cat .classpath` className



+ Reply to Thread