PDA

View Full Version : LongPathToShort wizard bean trouble



Jeff Morse
02-21-2006, 12:42 PM
Hello,

I am trying to compile a LongPathToShort wizard bean and am getting 3 "cannot find symbol" errors on the Win32Service in the following java code. Can someone please help me get my bean compiled?

Thanks,

Jeff
----------
import com.installshield.util.*;
import com.installshield.wizard.*;
import com.installshield.wizard.platform.win32.*;
import com.installshield.wizard.service.*;
public class LongPathToShort extends WizardAction
{
private String longPath = "";
// hidden property where value is stored
private String value = "";
public void execute(WizardBeanEvent event)
{
longPath = resolveString(longPath);
try
{
Win32Service ws = null;
ws = (Win32Service)getService(Win32Service.NAME);
value = ws.getShortPath(longPath);
}
catch (ServiceException se)
{
logEvent(this, Log.ERROR, se);
}
}
public String getLongPath()
{
return longPath;
}
public void setLongPath(String longPath)
{
this.longPath = longPath;
}
}

RobertDickau
02-21-2006, 03:48 PM
You might need to add this import, as well:

import com.installshield.wizard.platform.win32.win32service.*;

Jeff Morse
02-22-2006, 02:47 PM
Thanks Robert. Unfortunately, that doesn't fix the problem. Grasping at straws, I even tried various case changes in the calls to Win32Service, win32service, win32Service and Win32service, and got the same errors.

RobertDickau
02-22-2006, 03:54 PM
Hmmm... Please try that import I mentioned, and additionally include "%ISMPDIR%\distributables\platform\ext\windowsppk.jar" on your javac class path...

Jeff Morse
02-22-2006, 04:19 PM
Thanks Robert, once again you are the man. <lameExcuse>In my own defense, I based my compile script on the compile* scripts in the HelpLibrary/SupportFiles directory.</lameExcuse> Perhaps those should be updated in a future release? I'm definitely going to look at that launch.txt file, too. Anyway, my LongPathToShort bean compiles now. Unfortunately, it doesn't work right but that's phase 2.

Thanks again for your help,

Jeff