.classpath file instead of the CLASSPATH Environment variable.

Discussion in 'Java' started by dontspammenow@yahoo.com, Feb 29, 2008.

  1. Guest

    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?
     
    , Feb 29, 2008
    #1
    1. Advertising

  2. Arne Vajhøj Guest

    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
     
    Arne Vajhøj, Feb 29, 2008
    #2
    1. Advertising

  3. 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
     
    Mike Schilling, Mar 2, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page