At 07:26 PM 11/21/00 +0100, Berche, Guillaume wrote:
>Hello,
>
>After moving to JDE 2.2.6beta5, I am having a weird bean shell error when
trying to use the jde-show-class-source function:
>
>Beanshell expression evaluation error.
> Expression: jde.util.JdeUtilities.buildClassList(
"C:\jdk1.2.2\jre\lib\rt.jar;\users\gberche\latestBuild\Xtrim\src;\users\gber
che\latestBuild\Xtrim\lib\HTTPClient.zip;\users\gberche\latestBuild\Xtrim\li
b\Stingray\Stingray.zip;\users\gberche\latestBuild\Xtrim\lib\kevin.jar;\user
s\gberche\latestBuild\Xtrim\lib\Cryptix;\users\gberche\latestBuild\Xtrim\lib
\xml\xml.jar;\users\gberche\latestBuild\Xtrim\lib\jWrap\jWrapRuntime.jar;\us
ers\gberche\latestBuild\Xtrim\lib\jWrap\FlexibleLayout.jar;\users\gberche\la
testBuild\Xtrim\lib\JNL\Classes;c:/Tools/jakarta-tomcat/lib/servlet.jar;c:/T
ools/jakarta-tomcat/lib/jasper.jar");
> Error: // Error: Error parsing input: bsh.TokenMgrError: Lexical error
at line 2, column 43. Encountered: "j" (106), after : "\"C:\\"
>
>Would this come from my path including some backslashes? Should I update
to Unix-style slashes? I was trying to keep native path separators '\' so
that the buggy's Sun compiler ( version <1.2) would get native ones and be
happy. I could not figure out if this was wrong to set such path in JDE.
No. The problem comes from the fact that backslash is an "escape" character
in both Lisp and Java strings. This means that it has a special meaning
when it comes before certain characters in a string such as j, r, n, and \
itself. For example, when it comes before a j, it means that the j is to be
treated not as j but as a linefeed character. Thus, the string "C:\j" means
capital C followed by a colon followed by a line feed character. To express
what you want to express, you must escape the escape character, that is,
double the backslash, thus "C:\\j".
- Paul