cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Jeff_Morse
Level 6

LongPathToShort wizard bean trouble

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;
}
}
Labels (1)
0 Kudos
(4) Replies
RobertDickau
Flexera Alumni

You might need to add this import, as well:

import com.installshield.wizard.platform.win32.win32service.*;
0 Kudos
Jeff_Morse
Level 6

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.
0 Kudos
RobertDickau
Flexera Alumni

Hmmm... Please try that import I mentioned, and additionally include "%ISMPDIR%\distributables\platform\ext\windowsppk.jar" on your javac class path...
0 Kudos
Jeff_Morse
Level 6

Thanks Robert, once again you are the man. In my own defense, I based my compile script on the compile* scripts in the HelpLibrary/SupportFiles directory. 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
0 Kudos