[program-java] Re: java compilation

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: program-java@xxxxxxxxxxxxx
  • Date: Tue, 21 Sep 2010 13:35:44 -0500


Look at the articles on getting started with Java again that Susan 
Jolly referred us to. Just because aa jar file is in your current 
directory doesn'[t mean it is in your classpath. You must tell javac so 
with the -classpath option.


On Tue, Sep 21, 2010 at 11:58:13AM -0500, qubit wrote:
> no, actually, I have a login on John's machine so as to be able to work on 
> either or both windows and linux.  My base machine is windows.  So the one 
> I'm using on linux is John's.
> I copied swt.jar to my javafun directory with the fruit.java program.
> I haven't tried john's suggestion of using the -classpath flag, however, 
> since I had copied the .jar file to my own directory, I figured it was in my 
> classpath by default.  It still doesn't compile.
> --le
> ----- Original Message ----- 
> From: "Corbett, James" <James.Corbett@xxxxxxxxxxxxx>
> To: <program-java@xxxxxxxxxxxxx>
> Sent: Tuesday, September 21, 2010 7:26 AM
> Subject: [program-java] Re: java compilation
> Well, I'm assuming that you are refering to SWT-Win32-3235.dll?
> Jim
> -----Original Message-----
> From: program-java-bounce@xxxxxxxxxxxxx 
> [mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of qubit
> Sent: September 20, 2010 20:07
> To: java list
> Subject: [program-java] java compilation
> Greetings all --
> I am finishing reading the java-in-a-nutshell book and have as yet not done 
> much hacking.  Now I have a really silly question... I am looking over 
> Jamal's fruitbasket program, which is slick and elegant if you haven't taken 
> time to read it -- the whole program is under 200 lines and uses the swt 
> library for the GUI.  But I am having the most annoying time trying to 
> compile it.
> The file itself compiles fine, but even though I have a copy of swt.jar to 
> link into it, the javac compiler keeps rejecting it.  I tried putting a 
> symbolic link to the class tree, which is on linux in John Boyer's account, 
> but it still tried compiling  everything as if all the class files were out 
> of date, and failed because I didn't have permissions in that directory.
> Question: what do I do to suppress compilation of a library that is in my 
> classpath?  If I put swt.jar on the compiler's command line, I assume it 
> should use the class defs from there and not go around recompiling 
> everything.
> Thanx in advance.
> --le

John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
Madison, Wisconsin USA
Developing software for people with disabilities

Other related posts: