aspose file tools*
The moose likes Java in General and the fly likes [solved] add external jar for windows command line compile Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "[solved] add external jar for windows command line compile" Watch "[solved] add external jar for windows command line compile" New topic
Author

[solved] add external jar for windows command line compile

David Westbrook
Greenhorn

Joined: Dec 18, 2008
Posts: 16
hey,

i prefer working on my java programs over windows command line, and i would like to add an external jar file so i can start writing some servlets. i've googled, but haven't found any walkthrough for something like this (which surprised me) - anyone happen to know good way to do this?

regards and thanks in advance.
[ January 02, 2009: Message edited by: David Westbrook ]
Kristofer Treutwein
Greenhorn

Joined: Jan 02, 2009
Posts: 6
If you simply want to compile or run apps from command line, you can just add the jars to the classpath:
win: javac -classpath c:\path1\ext1.jar;d:\path2\ext2.jar de\example\MyClass.java

When running a java application, you have to add the classes folder as well
win: java -classpath bin;c:\path1\ext1.jar;d:\path2\ext2.jar de.example.MyClass


Note that under *ux* OS not a semicolon( , but a colon( is used to separate classpath parts.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39577
    
  27
Do you mean something like this


Or are you asking where to get that servlet jar file? In that case, look here.


Ping & DNS - updated with new look and Ping home screen widget
David Westbrook
Greenhorn

Joined: Dec 18, 2008
Posts: 16
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html

Found the answer here. Thnx for anyone who looked anyway
David Westbrook
Greenhorn

Joined: Dec 18, 2008
Posts: 16
@Ulf and Kristofer, that is pretty much what I ended up doing. Thank you for the help!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [solved] add external jar for windows command line compile
 
Similar Threads
BlueJ import ?
running with command line
How to compile servlets with servlet-api.jar
standalone application question
Absolute/Relative path of jar file?