Aha, the way that a list of strings should be defined is through
clicking on [INS] to add another element, and then have one directory
per entry:

[INS] [DEL] Path:
/home/otis/wgen/eclipse-workspace/mclass/ampNG/build/classes
[INS] [DEL] Path:
/home/otis/wgen/eclipse-workspace/mclass/javaserver/build/classes
[INS] [DEL] ...

This will be turned into a list of strings. I think that including
$CLASSPATH there is not likely to work, since it will not be correctly
changed from a :-separated list into an elisp list. If it works for the
beanshell, that is more of an accident than anything, and I think it is
not likely to work for large parts of JDE.

What I do is to put each classpath entry into a separate entry in
jde-global-classpath. Since this is project-specific for me, I normally
choose "Save for current session", and then to a C-cC-vC-p to save the
value to the project file, prj.el. I also have a default
jde-global-classpath in my .emacs ("Save for future sessions" in
customize).

/ Petter

> -----Original Message-----
> From: otisg [mailto:[EMAIL PROTECTED] 
> Sent: den 4 mars 2003 00:24
> To: Petter M�hl�n; [EMAIL PROTECTED]
> Subject: Re: RE: BeanShell can't find my class 
> (jde-import-find-and-import)
> 
> 
> Hello,
> 
> Yes, I modified the value of this variable
> via customize-variable, not manually.  This
> is what I entered:
> 
> Jde Global Classpath: *
> [INS] [DEL] Path:
> $CLASSPATH:/home/otis/wgen/eclipse-workspace/mclass/ampNG/buil
> d/classes:/home/otis/wgen/eclipse-workspace/mclass/javaserver/
> build/classes
> 
> The description of this variable states,
> among other things:
> 
> Note that the value of this variable is a
> list of strings, each of which specifies a
> path. The JDE converts this list to a colon-
> or semicolon-separated list before inserting
> in the compiler or vm command line. 
> 
> The path may start with a tilde (~) or
> period (.) and may include
> environment variables.
> 
> (NOTE: it actually didn't expand tildes
> properly - it expanded them to the name of
> my current directory instead of my home.  I
> could use $HOME under UNIX, I guess.  The
> above absolute path should be unambiguous.)
> 
> 
> If I do C-v C-v C-. and then look at the
> BeanShell buffer I see that it correctly
> expanded $CLASSPATH:
> 
> /usr/local/jdk/bin/java -classpath
> /usr/lib/xemacs/xemacs-packages/etc/jde/java/bsh-commands:/usr
/local/jdk/lib/tools.jar:/usr/lib/xemacs/xemacs->
packages/etc/jde/java/lib/checkstyle-all.jar:/usr/lib/xemacs/x
> emacs-packages/etc/jde/java/lib/jakarta-regexp.jar:/usr/lib/xe
> macs/xemacs-packages/etc/jde/java/lib/jde.jar:/usr/lib/xemacs/
> xemacs-packages/etc/jde/java/lib/bsh.jar:/usr/local/jakarta-co
> mmons-fileupload/commons-fileupload.jar:/usr/local/jakarta-com
> mons-digester/commons-digester.jar:/usr/local/jakarta-commons-
> logging/commons-logging.jar:/usr/local/jakarta-commons-discove
ry/commons-discovery.jar:/usr/local/jakarta->
commons-lang/commons-lang.jar:/usr/local/jakarta-commons-beanu
tils/commons-beanutils.jar:/usr/local/jakarta->
commons-collections/commons-collections.jar:/usr/local/jakarta
> -commons-validator/commons-validator.jar:/usr/local/strutstest
> case/strutstestcase.jar
> :/home/otis/wgen/eclipse-workspace/mclass/ampNG/build/classes
> :/home/otis/wgen/eclipse-workspace/mclass/javaserver/build/classes
> bsh.Interpreter
> 
> 
> 
> If I then change jde-global-classpath and
> remove the ':' characters from there,
> separating the 3 elements by a space, then
> BeanShell constructs the wrong -classpath
> argument, like this:
> 
> /usr/local/jdk/bin/java -classpath
> /usr/lib/xemacs/xemacs-packages/etc/jde/java/bsh-commands:/usr
/local/jdk/lib/tools.jar:/usr/lib/xemacs/xemacs->
packages/etc/jde/java/lib/checkstyle-all.jar:/usr/lib/xemacs/x
> emacs-packages/etc/jde/java/lib/jakarta-regexp.jar:/usr/lib/xe
> macs/xemacs-packages/etc/jde/java/lib/jde.jar:/usr/lib/xemacs/
> xemacs-packages/etc/jde/java/lib/bsh.jar:/usr/local/jakarta-co
> mmons-fileupload/commons-fileupload.jar:/usr/local/jakarta-com
> mons-digester/commons-digester.jar:/usr/local/jakarta-commons-
> logging/commons-logging.jar:/usr/local/jakarta-commons-discove
ry/commons-discovery.jar:/usr/local/jakarta->
commons-lang/commons-lang.jar:/usr/local/jakarta-commons-beanu
tils/commons-beanutils.jar:/usr/local/jakarta->
commons-collections/commons-collections.jar:/usr/local/jakarta
> -commons-validator/commons-validator.jar:/usr/local/strutstest
> case/strutstestcase.jar
> /home/otis/wgen/eclipse-workspace/mclass/ampNG/build/classes
> /home/otis/wgen/eclipse-workspace/mclass/javaserver/build/classes
> bsh.Interpreter
> 
> Note how there are spaces before '/home...'
> parts.  They should be separated with a ':',
> really.  Is this a BeanShell or a JDE bug? 
> Or my fault?
> 
> So I think what I entered initially (the
> ':') should work for BeanShell, yet it does
> not find my class.
> 
> However, after loading BeanShell I went to
> its buffer and did this:
> 
> bsh % browseClass("String")
> 
> That resulted in:
> 
> // Error: Void assignment. : at Line: 32 :
> in file: commands/browseClass.bsh : browser
> = classBrowser ( )
> 
> However, that did start a Java (Swing)
> application that contained a list of all
> root packages (com..... net..... org....),
> including my package, which is in those 2
> directories specified in jde-global-classpath.
> 
> Yet, JDE says "No completion at this point".
> 
> Can anyone suggest what else I can look for?
> 
> Thanks,
> Otis
> 
> 
> ---- On Sat, 1 Mar 2003,
> =?iso-8859-1?Q?Petter_M=E5hl=E9n?=
> ([EMAIL PROTECTED]) wrote:
> 
> > Hm, it seems that your definition of
> jde-global-classpath is a bit
> > weird:
> > 
> > >  '(jde-global-classpath (quote ("$CLASSPATH
> > >
> ~/wgen/eclipse-workspace/mclass/ampNG/build/classes
> > >
> ~/wgen/eclipse-workspace/mclass/javaserver/build/classes")))
> > 
> > The quotes are in the wrong places, it
> should probably be
> > 
> >  '(jde-global-classpath (quote ("$CLASSPATH"
> > 
> "~/wgen/eclipse-workspace/mclass/ampNG/build/classes"
> > 
> "~/wgen/eclipse-workspace/mclass/javaserver/build/classes")))
> > 
> > Try changing it and see if it helps. Did
> you use customize-variable to
> > set the value? It is definitely preferable
> to do so rather than manually
> > editing the prj.el or .emacs. I'm also not
> 100% sure about including
> > $CLASSPATH in jde-global-classpath, that
> might not give the result you
> > are after.
> > 
> > / Petter
> > 
> > > -----Original Message-----
> > > From: otisg [mailto:[EMAIL PROTECTED] 
> > > Sent: den 28 februari 2003 21:32
> > > To: [EMAIL PROTECTED]
> > > Subject: BeanShell can't find my class
> (jde-import-find-and-import)
> > > 
> > > 
> > > Hello,
> > > 
> > > I am trying to use JDE's
> > > jde-import-find-and-import.
> > > Unfortunately, JDE/BeanShell cannot find any
> > > class I specify, and therefore JDE cannot
> > > insert the import statement.
> > > 
> > > In my code I have:
> > >   Bar bar = new Bar();
> > > 
> > > The focus is on Foo when I invoke
> > > jde-import-find-and-import.
> > > BeanShell starts and includes this in
> > > -classpath argument:
> > > 
> > >   -classpath
> > >
> ~/wgen/eclipse-workspace/mclass/ampNG/build/classes
> > > 
> > > This is the directory where Bar class is:
> > >
> ~/wgen/eclipse-workspace/mclass/ampNG/build/classes/foo/Bar.class
> > > 
> > > So how come BeanShell cannot find it?
> > > Where is it looking for my class?
> > > 
> > > Thank you,
> > > Otis
> > > P.S.
> > > I have the following JDE variables defined:
> > > 
> > >  '(jde-global-classpath (quote ("$CLASSPATH
> > >
> ~/wgen/eclipse-workspace/mclass/ampNG/build/classes
> > >
> ~/wgen/eclipse-workspace/mclass/javaserver/build/classes")))
> > >  '(jde-sourcepath (quote
> > >
> ("~/wgen/eclipse-workspace/mclass/javaserver/src/java"
> > >
> "~/wgen/eclipse-workspace/mclass/javaserver/web/src/java"
> > >
> "~/wgen/eclipse-workspace/mclass/amp/web/src/java"
> > >
> "~/wgen/eclipse-workspace/mclass/ampNG/web/src/java"
> > >
> "~/wgen/eclipse-workspace/mclass/reading/src/java"
> > >
> "~/wgen/eclipse-workspace/mclass/reading/web/src/java"
> > >
> "~/wgen/eclipse-workspace/mclass/rigby/src/java"
> > >
> "~/wgen/eclipse-workspace/mclass/rigby/web/src/java")))
> > > 
> > > 
> > >
> ________________________________________________
> > > Get your own "800" number
> > > Voicemail, fax, email, and a lot more
> > > http://www.ureach.com/reg/tag
> > > 
> > 
> > 
> > 
> 
> 
> ________________________________________________
> Get your own "800" number
> Voicemail, fax, email, and a lot more
> http://www.ureach.com/reg/tag
> 

Reply via email to