Thanks a lot.
It works great! Even under Linux.
The code actually worked perfectly since the begining, but if (under
linux) your $CLASSPATH starts with ':', jpack think the package root is
in the current directory, and writes nothing in the 'package' statement.
I saw the problem thanks to the 'describe variable'. (thank you Bob).
I saw in the documentation that the $CLASSPATH is not appended in the
jde-global-classpath.
It would be nice to see your code in the next JDE release Paul, no?
Didier.
Paul Kinnucan wrote:
>
> At 02:49 PM 8/19/00 +0200, you wrote:
> >This dows not seem to work.
> >When I use jpack-package-update, everything the whole 'package' string
> >is removed (only the comment remains.)
> >
> >How can I test jde-append-classpath to see its result? When I try to M-x
> >jde-append-classpath, emacs does not find it. [no match]
> >
>
> I have tested it and it works for me. However, the function I gave has a
> bug. It will keep appending CLASSPATH every time you switch projects. Here
> is a revised version that fixes this bug. I also made the function a
> command so you can use M-x to run it.
>
> - Paul
>
> (defun jde-append-classpath ()
> "*Adds the contents of CLASSPATH to `jde-global-classpath',
> but only if the contents that are not already in `jde-global-classpath'."
> (interactive)
> (let ((paths
> (jde-path-string-to-list
> (getenv "CLASSPATH"))))
> (while paths
> (let ((path (car paths)))
> (if jde-global-classpath
> (if (not
> (find-if
> (lambda(p) (string= p path))
> jde-global-classpath))
> (setq jde-global-classpath
> (append jde-global-classpath (list path))))
> (setq jde-global-classpath (list path)))
> (setq paths (cdr paths))))))
> >Paul Kinnucan wrote:
> >>
> >> At 08:29 PM 8/18/00 +0200, you wrote:
> >> >Hi all,
> >> >
> >> >Is there a way to tell JDE to append the unix $CLASSPATH to
> >> >jde-global-classpath??
> >>
> >> Add the following line to your .emacs file:
> >>
> >> (defun jde-append-classpath ()
> >> (setq jde-global-classpath
> >> (append
> >> jde-global-classpath
> >> (jde-path-string-to-list
> >> (getenv "CLASSPATH")))))
> >>
> >> Then type
> >>
> >> M-x customize-variable jde-entering-java-buffer-hooks
> >>
> >> and add
> >>
> >> jde-append-classpath
> >>
> >> to the list of hooks AFTER jde-reload-project-file. The hook function
> >> should append the value of CLASSPATH to the list of classes specified by
> >> jde-global-classpath in your .emacs or .prj file.
> >>
> >> - Paul
> >>
> >>
> >>
> >> ------------------------------------------------------------
> >> HOW TO ASK FOR TECH SUPPORT
> >>
> >> When requesting technical support, please generate a problem report, using
> >> the JDE->Help->Submit Problem Report command, and submit this report along
> >> with your help request. The Submit Problem Report command is designed to
> >> gather all the information that someone who does not have direct access to
> >> your system might need to solve your problem. It saves people who want to
> >> help you from having to waste time trying to dig relevant information out
> >> of you. Please note that if you do not get a response to a question, it may
> >> be because you did not provide sufficient information to solve the problem.
> >> Filing a problem report is the best way to ensure that you get a response.
> >>
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >> JDE website: http://sunsite.auc.dk/jde/
> >>
> >> JDE mailing list archive:
> >> http://www.mail-archive.com/[email protected]/maillist.html
> >
> >--
> >Didier Dubois
> >mailto:[EMAIL PROTECTED] http://www.idbsoft.ch
> >
> >
> ------------------------------------------------------------
> HOW TO ASK FOR TECH SUPPORT
>
> When requesting technical support, please generate a problem report, using
> the JDE->Help->Submit Problem Report command, and submit this report along
> with your help request. The Submit Problem Report command is designed to
> gather all the information that someone who does not have direct access to
> your system might need to solve your problem. It saves people who want to
> help you from having to waste time trying to dig relevant information out
> of you. Please note that if you do not get a response to a question, it may
> be because you did not provide sufficient information to solve the problem.
> Filing a problem report is the best way to ensure that you get a response.
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> JDE website: http://sunsite.auc.dk/jde/
>
> JDE mailing list archive:
> http://www.mail-archive.com/[email protected]/maillist.html
--
Didier Dubois
mailto:[EMAIL PROTECTED] http://www.idbsoft.ch