Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2084

Re: which folder I should these jar files to?

Path csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From markspace <-@.>
Newsgroups comp.lang.java.help
Subject Re: which folder I should these jar files to?
Date Sat, 08 Sep 2012 20:35:33 -0700
Organization A noiseless patient Spider
Lines 36
Message-ID <k2h2q8$ucb$1@dont-email.me> (permalink)
References <4c945d47-896e-42af-881e-329ff2218153@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Sun, 9 Sep 2012 03:35:36 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="61282af8d6595e8d991edb5ac03d6e00"; logging-data="31115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FcEF/XQIeL92hXoBnpiUhcinfNau1lms="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0
In-Reply-To <4c945d47-896e-42af-881e-329ff2218153@googlegroups.com>
Cancel-Lock sha1:6k862mRtDrn3PmLOZDjnpJUMm/o=
Xref csiph.com comp.lang.java.help:2084

Show key headers only | View raw


On 9/8/2012 12:21 AM, gearss8888@gmail.com wrote:
> I am new in Java, I want to run a Java program, it needs three jars:
> swt-3.6M3-win32-win32-x86.jar,DJNativeSwing-
> SWT.jar,DJNativeSwing.jar, I get them, but I donot know which place I
> should put them into, can someone help me?


I usually put Jar files in a common location like:

C:/Users/Me/Development/Libs/swt/swt-3.6M3-win32-win32-x86.jar
C:/Users/Me/Development/Libs/swt/DJNativeSwing.jar
C:/Users/Me/Development/Libs/swt/DJNativeSwing-SWT.jar

Then I set those Jars as libraries in my IDE, or in an ant properties file.

Example:

<project name="MyProject" default="dist" basedir=".">

   <property name="libs" location="C:/Users/Me/Development/Libs/swt/*"/>

   <target name="compile" depends="init" >
     <!-- Compile the java code from ${src} into ${build} -->
     <javac srcdir="src/" destdir="dest/" classpath="${libs} />
   </target>

</project>

(The above wasn't syntax checked or tested.)

Using the classpath environment variable is kind of newbie-ish, and 
using the ext directory is downright dangerous, imo.  Best to learn to 
separate the libraries need for each project.  Trying to copy every 
single Jar file you might need into the ext directory is a sure way to 
have a train wreck at some point.

Back to comp.lang.java.help | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

which folder I should these jar files to? gearss8888@gmail.com - 2012-09-08 00:21 -0700
  Re: which folder I should these jar files to? Joerg Meier <joergmmeier@arcor.de> - 2012-09-08 11:11 +0200
    Re: which folder I should these jar files to? Lew <lewbloch@gmail.com> - 2012-09-08 16:57 -0700
      Re: which folder I should these jar files to? Joerg Meier <joergmmeier@arcor.de> - 2012-09-09 11:54 +0200
  Re: which folder I should these jar files to? Roedy Green <see_website@mindprod.com.invalid> - 2012-09-08 19:51 -0700
  Re: which folder I should these jar files to? markspace <-@.> - 2012-09-08 20:35 -0700

csiph-web