|
|
#1 |
|
Junior Member
Join Date: Oct 2004
Posts: 6
|
Java Class with $ causes error
I have a java class that has a dollar sign in the name when is compiled.
Anyone have any ideas how to make the following work? File "MyApp\LibMessageDigester$MyHandler.class" Wanted to try to escape it with \ but that will be considered part of the path? File "MyApp\LibMessageDigester\$MyHandler.class" Any pointers greatly appreciated. Jay Smith jay.w.smith@tyson.com |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Use $$.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2004
Posts: 6
|
Thanks for the quick reply but that did not work, did I do it wrong?
File: MyApp\LibMessageDigester$$MyHandler.class" -> no files found. Usage: File [/nonfatal] [/a] ([/r] filespec [...]|/oname=outfile one_file_only) Error in script "C:\Temp\NSIS SCRIPTS\SST.nsi" on line 59 -- aborting creation process |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Hmm... Thinking about it again, it shouldn't even process the dollar sign, so there is no reason to escape it. I have just tested it and it works fine. Make sure you got the path right.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Oct 2004
Posts: 6
|
I forgot that the orginal files get deleted, the installer piece works ok, complains of an undefined variable in the uninstall section with the DELETE "my$StupidFile.class" but the installer does build.
It doesn't remove that file during uninstall. Thanks for you help I really appreciate you taking the time. Jay |
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
In the Delete line you need double dollar sign because it is parsed.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Oct 2004
Posts: 6
|
Tried that and it does not complain about the undefined variable but still doesn't remove the file at uninstall time.
Thanks, I will just but it in the known issues list and roll on. Maybe there will be a solution for it in the future. Thanks again. |
|
|
|
|
|
#8 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
You should specify a full path when using delete. Use:
code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Oct 2004
Posts: 6
|
This is the actual line I am using
Delete "C:\Program Files\cognos\crn\sdk\java\ExecReportsInstall\ExecReportsUI$$MenuHandler.class" |
|
|
|
|
|
#10 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Try verifying the path and make sure it's not in use.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#11 |
|
Junior Member
Join Date: Oct 2004
Posts: 6
|
And man are you fast at reading these post. I have neve seen responses this fast.
Ok, that did work changed it from C:\Program Files\cognos\crn\sdk\java\ExecReportsInstall to $INSTDIR and it started working. Dummy me, I wasn't pointed to the install dir at all. Thanks so much for humor a stupid programmer, today I am worn out. It's working and you were a great help. Jay |
|
|
|
|
|
#12 |
|
Junior Member
Join Date: Jan 2008
Posts: 3
|
Hi, I've got a question related to this long dead thread's discussion:
I'm making an installer which will contain Java-files containing $-signs in the filename. I'm also using the Uninstall log. The specific macro I'm having some problems with is. ; File macro !macro File FilePath FileName IfFileExists "$OUTDIR\${FileName}" +2 FileWrite $UninstLog "$OUTDIR\${FileName}$\r$\n" File "${FilePath}${FileName}" !macroend !define File "!insertmacro File" When I add files using e.g code: it generates warnings since both the IfFileExists and FileWrite are runtime and will think $Kermit.txt is a variable and can't find it. I'm using a external script which generates these lines in an autobuild enviroment so there would not be any problem generating code: instead, but this results in an "file not found" error. Is there anyway to make IfFileExists and File behave the same regarding variable names? Or Is there another uninstall log which is recommended for use? (since these macros doesn't seem to have changed for a couple of years) Or do I have to rewrite these macros to change the string for the IfFileExists command? (uglyfying the code) |
|
|
|
|
|
#13 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
I think the easiest solution in this case would be uglyfying the code.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|