|
Re: Running java code developed in Eclipse from java.exe [message #208679 is a reply to message #208662] |
Wed, 02 May 2007 21:31 |
Paul A. Rubin Messages: 188 Registered: July 2009 |
Senior Member |
|
|
Phil Troy wrote:
>
> I have successfully developed a java project in Eclipse. Actually,
> there are more than two projects, all but the last of which contain
> classes that I wish to be able to use in other projects. Each project
> has src and bin folders.
>
> Can someone give me explicit steps for creating a jar file and running
> it from the command line using java.exe. My workspace is
> D:\PhilsWorkspace and my projects are subfolders of that folder. I am
> using Windows XP.
>
Google is your friend:
http://www.cs.laurentian.ca/badams/c1047/eclipse-tutorials/e xport-tutorial.html#export-jar
To run it,
> java -cp path_to_other_classes
-Djava.library.path=path_to_external_libraries -jar your.jar
where the cp entry is a list of paths to external classes you need
(quite possibly none, in which case omit it), and the library path is a
list of paths to external libraries you need (again, quite possibly
none, in which case omit it). Under Windows, you can use ';' as a path
delimiter within the path strings, and you can use either Unix (/) or
Microsoft (\) separators for the parts of paths. Enclose the paths in
quotes if they contain any spaces.
HTH,
Paul
|
|
|
Powered by
FUDForum. Page generated in 0.08769 seconds