Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

.classpath file instead of the CLASSPATH Environment variable.

Thread view: 
dontspammenow@yahoo.com - 29 Feb 2008 17:51 GMT
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?
Arne Vajhøj - 29 Feb 2008 17:58 GMT
> 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
Mike Schilling - 02 Mar 2008 08:19 GMT
> Writing a java client application in Eclipse, and I would like to
> call
[quoted text clipped - 4 lines]
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.