Local JNLP filename is truncated in windows shortcut

Greetings,
I've got a problem with JNLP shortcut paths getting truncated. I'm running Windows XPsp2 as the client with Java 1.5.0.10.
The web URL I'm accessing is dynamically generated, and is apparently getting too long to be handled. I'm passing only the necessary data keys within an encoded URL, something like:
http://server.domain.com:port/application/jnlp/5t-cjxLGtlRl4ZbRO.zIYu61f32GNDSvTby.W8mvgHhCQVHbbRnoSjLdvCqz9u-KmOAAq9uJYDe9i1RgD7kMuAg-udKBBq5xK.O5Od.uhx9ASvD.JnPMUImR9WMl-iUfFtH38.c04u2M1055QiOL8A__
and using a URI mapping within my web-app for +/jnlp/*+ to get the request into my servlet for decoding and dynamic JNLP generation. Within the servlet I decode the keys and, based on other data retrievals, generate the JNLP file for that user.
Everything works very smoothly, as long as the encoded string doesn't exceed a certain length.
Whatever the length of the URL, the application launches from the web with no problem. But, my application needs to support being launched offline, and so it I have to set to create windows shortcuts when launched.
When the URL length gets to be too long, the shortcuts fail to find the icon, and when launched from the shortcut generates the following error:
An error occurred while launching/running the application.
Category: Invalid Argument Error
Could not load file/URL specified: C:\Documents and Settings\user12\Application Data\Sun\Java\Deployment\cache\javaws\http\Dserver.domain.com\Pport\DMapplication\DMjnlp\AM5t-cjxLGtlRl4ZbRO.zIYu61f32GNDSvTby.W8mvgHhCQVHbbRnoSjLdvCqz9u-KmOAAq9uJYDe9i1RgD7kMuAg-udKBBq5xK.O5Od.uhx9ASvD.JWith the last, in this case 39, characters truncated off the string.
I'm not sure if this is a JavaWeb limitation, where the javaws application can only handle a directory path up to 252 characters.
Or (in my opinion more likely) this is a Microsoft limitation, where the full shortcut target can't exceed 293 characters.
While I've been able to manually to (on my development system) recreate these shortcuts as:
Target: C:\WINDOWS\system32\javaws.exe -offline "5t-cjxLGtlRl4ZbRO.zIYu61f32GNDSvTby.W8mvgHhCQVHbbRnoSjLdvCqz9u-KmOAAq9uJYDe9i1RgD7kMuAg-udKBBq5xK.O5Od.uhx9ASvD.JnPMUImR9WMl-iUfFtH38.c04u2M1055QiOL8A__"
Start in: C:\Documents and Settings\user12\Application Data\Sun\Java\Deployment\cache\javaws\http\Dserver.domain.com\Pport\DMapplication\DMjnlp
And the shortcuts function as expected. But, I clearly won't have that level of control over the end user's system configurations.
Has anyone else encountered/overcome this limitation?
And if so what was the workaround?
Thanks.

One ugly hack that I've found can be made to work, as part of my web start application, using the http://www.optimumx.com/download/ shortcut.exe executable, and dancing around the system properties:
System.getProperty ("os.name", "").toLowerCase ().matches ("^.*windows*.$");
System.getProperty ("user.home", ".").replace ('\\', '/');
System.getProperty ("java.io.tmpdir", userHome).replace ('\\', '/');
Since, I'm running with a signed application for other reasons, I can extract the the executable as a resource from the jar file, play it out into the temp directory, and use it to update the shrotcuts, resetting the parameters, start in directory, and icon locations of the *.lnk file.
But, this is a very ugly workaround for what looks like a simple buffer overflow problem.

Similar Messages

  • ITunes: filenames are truncated to 37 characters

    I downloaded podcasts from the internet with itunes. the filenames appear correctly in iTunes but on the hard drive (My Documents\My Music\iTunes\iTunes Music\Podcasts\)
    filenames are truncated to 37 characters. Any idea how to get the full filenames?
    using Windows XP SP2
    iTunes 6.0.5

    FYI this isn't entirely benign. i've had this cause actions to OVERWRITE files without giving any warning. specifically if a batch action is done on a bunch of files with long filenames with numbers at the end. the numbers are omited and so every file has the same name and is over written as the action progresses. this would overwrite an unnumbered but same named file too.

  • Robo-form toolbar add-on causing windows shortcut error messages

    Robo-form Toolbar Add-on causing Windows Shortcut error messages! HELP

    The local PC needs the
    u2022 CRRuntime_12_2_mb.exe
    u2022 SAPCrystalSetup.exe
    and dot net 3.5 installed.
    There are very good install instructions in the package, it installs differently to other add ons on the client side.

  • I tried opening my Mac files to windows by using Macdriver 8, however upon opening the file my previous mac folders were converted to windows shortcuts and upon returning to my mac pc, all my folders has a .lnk file extension which I cannot open.

    I tried opening my Mac files to windows by using Macdriver 8, however upon opening the file my previous mac folders were converted to windows shortcuts and upon returning to my mac pc, all my folders has a .lnk file extension which I cannot open. Need help very badly since the hard drive I use is the only back up I have for my very old pics. Thank you...

    Backup with cloning software your HD to have an exact copy of it as it is.
    Use this methodology to recover your partition.
    Have fun,
    Leo

  • Windows Shortcut Keys no longer working!?!

    Hello All,
    Framemaker 8(p277) has recently decided that after a period of use, standard windows shortcuts will stop working (ctrl+v / ctrl+c / ctrl+z!!! etc..) along with keystroke / character repeats.
    This only occurs within framemaker. Windows short cuts and keystroke repeat still function correctly in all other apps running at the same time
    right-clicking and selecting copy / paste / etc.. still works.
    Un-installing and re-installing the most recent framemaker patch seemed to temporarily fix the problem, however, it has now returned.
    I'm running xp Sp3, fully patched...
    and the repetitious arrow-key bashing that I'm now having to do is slowly driving my co-workers INSANE :)
    please help!
    brad

    Brad:
    My experience with the problem is that it's been around since version 5 of the product.
    I've observed that the problem seems to occur if I double-click on an embedded graphic, thus opening it in a third-party graphics program (PaintShop Pro 7). That is to say that on days when I don't work with graphics, I can run FrameMaker for hours and never have any CTRL key problems.
    When the problem does occur, I must perform one of the following to restore function-key operation, in order of preference:
    Exit and restart FrameMaker (easiest but doesn't always work)
    Log off and then back in to Windows (somewhat more time consuming, works almost all of the time)
    Reboot (time consuming, but always works)
    That's my experience. Other forum regulars have had different experiences...
    Cheers & hope this helps,
    Riley

  • Level of local SQLCE/other DB support in windows phone 8.1/using linq to sql from dll?

    I have had a mixed opinion for SQLCE support in windows phone 8/8.1. Is their still support for a local SQLCE or other database in windows phone 8.1? (A lot of different blog articles created their own handlers it appears and one used
    an visual studio app called SQLmetal) I am hoping to at least figure out the libraries to use for Linq to SQL in windows phone 8.1 in order to access a local Database. I only need to retrieve data from a simple Database with one -
    two tables and one of the tables has three fields.
    I wish to access the local DB from a dll file even if I have to use Linq to SQL. The reason for this is to store data for a simple game while the app is running. However, I may need to send data to the database and would like to separate that
    from the main application if possible. The only other question is: how do I add local database support to a dll file in windows phone 8.1? (This is my main objective but I need to know my database options first)
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering
    - Yoda. Blog - http://www.computerprofessions.co.nr

    Windows Phone Silverlight 8.1 apps can still use LINQ to SQL (System.Data.Linq) see:
    http://msdn.microsoft.com/en-us/library/windows/apps/hh202860(v=vs.105).aspx
    For Windows Phone 8.1 [runtime] app you would need to use an external library like
    SQLite 
    There is a jumpstart training talk on using SQLite in Windows Phone 8.1 apps here:
    http://channel9.msdn.com/Series/Building-Apps-for-Windows-Phone-8-1/19
    I'm not sure what you mean by: "...access the local DB from a dll file..."  Do you mean you want the library used to access the database to be portable across
    platforms?
    Eric Fleck, Windows Store and Windows Phone Developer Support. If you would like to provide feedback or suggestions for future improvements to the Windows Phone SDK please go to http://wpdev.uservoice.com/ where you can post your suggestions and/or cast
    your votes for existing suggestions.
    I saw the first link and I think I have already been through some of that tutorial on channel 9 already.
    I'm not sure what you mean by: "...access the local DB from a dll file..."  Do you mean you want the library used to access the database to be portable across platforms?
    This would be a yes. I need use it to submit an application to the store (I wish to have the data and business logic in the dll file while having the GUI separate). I am currently using the portable dll but if you think using another dll type would help
    I will try that. I am a VB.NET programmer and so I can see where some programmers get their worries about SQLCE (It seems a lot of VB and VB.NET programmers like it from my time helping on the VB.NET forums second to SQL Server only).
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering
    - Yoda. Blog - http://www.computerprofessions.co.nr
    Nevermind, I changed the dll type to "Silverlight" and I can use the System.Data.Linq reference at least.
    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to
    suffering - Yoda. Blog - http://www.computerprofessions.co.nr

  • Macintosh alias vs windows shortcut on CD

    I have a CD containing a snapshot of a website for archival purposes. It has to be readable on a windows machine. To make it easier for users to access I have created an alias that points to a file index.html. The alias is in the root directory of the CD. All the contents of the website are in a folder also located in the root directory. The CD has been burned successfully (using toast) and is fully functional on a mac. On a windows machine the alias appears as a zero byte file and no longer links to index.html. Open the folder - all the files work. I have found out that mac alias and windows shortcut work differently and this seems to be the cause of the problem.
    I know I could refer users to the original file using a readme.html. I also know I could move index.html to the root directory but this would require a lot of links to be re-coded.
    Is there any way to make a shortcut that windows will recognise on a mac? This would be my preferred solution.

    Does sticking to web safe colours make a difference?
    No. That's just a set of colors that is evenly distributed across the color space. There's really nothing special about the colors themselves; they aren't magic or better than any others.

  • JFileChooser and windows shortcuts (lnk files)

    Is there any way to get JFileChooser to follow windows shortcuts? I am using 1.4.1_01 on XP, which is full of "helpful" shortcuts to things like shared picture folders, etc, which JFileChooser chokes on.
    I would think Sun would implement support for the underlying lnk files, since this is an OS issue.

    Ok, I found a bug report for this, with a workaround hack. I'll post it here for anyone who is interested.
    http://developer.java.sun.com/developer/bugParade/bugs/4356160.html

  • HT1343 Where can I modify or disable system/windows shortcuts ?

    Hello,
    I am currently looking for a way to modify or disable windows shortcuts, I am talking about shortcuts such as : Command-H (hide the application)
    I searched on internet, went to an Apple Store where a gut told me it was in some .plist but I couldn't find it (since he just said me that and leave, apparently as a developer I should figure it out myself)
    I also deactivated every single sohrtcut I could find (except 4 for my desktops)  in System Prefrences > Keyboard > Shortcuts.
    So I am asking here, is there a file where I can configure these shortcuts? And if yes, where it is and what's its name?
    I am really looking forward to this because I don't use those shortcuts but I would like to make them do other things.
    By the way here is my configuration :
    MacBookPro (late 2011)
    Mac OS X Lion 10.7.5 (11G63)
    Best regards,
    Adrien.

    Window>Brushes

  • Local Apple Software Update Server for Windows

    Has anyone figured out, how to use Leopard's Software Update Server, as a local Apple Software Update Server for Windows?
    As you may know, 10.5 Software Update Server downloads, not only mac updates, but the windows' version of them as well (e.g. Safari, iTunes for windows).
    There has to be a way to use that new feature.

    {quote:title=Apple wrote:}
    Software Update Server is capable of automatically mirroring updates between
    Apple’s software update server and your local server to guarantee that the most
    current updates are immediately available. Mac OS X Server also supports hosting
    Apple updates for software running in Boot Camp, such as iTunes and QuickTime for
    Windows. To ensure security, all updates are digitally signed by Apple.
    {quote}
    Comes from http://images.apple.com/server/macosx/docs/L355781BSoftwrUdtTB.pdf
    No idea, how to get it running smoothly yet, however.

  • Create Windows Shortcuts

    With ZfD 7 I was able to add Windows application shortcuts in the the Application Object. I've been searching on how to do this with ZCM bundles and so far I'm stumped. I don't see any actions related to creating a shortcut, nor can I find any reference to shortcuts in the documentation.
    I've also tried uploading a shortcut file to the server, but the ZCC simple follows the path within the shortcut, attempting to upload the files the shortcut targets instead.
    Has anyone figured out a way to do this? Am I missing something obvious?

    Well, We all have those moments.
    One of my favorites was the time I spend close to an hour trying to get a PC
    to recognize an external USB HDD.
    After Giving UP, I asked my boss.
    It took him about 3.2 Seconds..............You have it plugged into the
    wrong computer........Doh!!!
    (In my defense, there were 4 stacked on top of each other, but
    still..............)
    Craig Wilson - MCNE, MCSE, CCNA
    Novell Support Forums Volunteer Sysop
    Novell does not officially monitor these forums.
    Suggestions/Opinions/Statements made by me are solely my own.
    These thoughts may not be shared by either Novell or any rational human.
    "seuferer" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Jeeesh!! Do I feel stupid! Where's my DOS command book?:)
    >
    > Thanks for the help.
    >
    > David
    >
    >
    >
    > Craig Wilson;1544116 Wrote:
    >> From the Command Prompt just rename the file form "ShortCut.LNK" to
    >> "ShortCut.ZZZ"
    >>
    >> --
    >> Craig Wilson - MCNE, MCSE, CCNA
    >> Novell Support Forums Volunteer Sysop
    >>
    >> Novell does not officially monitor these forums.
    >>
    >> Suggestions/Opinions/Statements made by me are solely my own.
    >> These thoughts may not be shared by either Novell or any rational
    >> human.
    >>
    >> "seuferer" <[email protected]> wrote in message
    >> news:[email protected]...
    >> >
    >> > Sorry if this is a stupid question, but how do you change the .lnk
    >> > extension?
    >> > I've read about a reg hack to get the .lnk to show up. Is this what
    >> I
    >> > have
    >> > to do?
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> > Craig Wilson;1532885 Wrote:
    >> >> This issue has been discussed.
    >> >> I believe it's being fixed in ZCM 10.1.0, but I'm not 100%
    >> positive.
    >> >>
    >> >> For now, you can do the following.
    >> >>
    >> >> Rename the file form MyShortCut.LNK to MyShortCut.ZZZ and add the
    >> file
    >> >> via
    >> >> the "install file" option in the bundle.
    >> >> After this is created, go into the "Install File" action and change
    >> >> the
    >> >> "Destination File Name" from MyShortCut.ZZZ back to "MyShortCut.LNK
    >> >>
    >> >> --
    >> >> Craig Wilson - MCNE, MCSE, CCNA
    >> >> Novell Support Forums Volunteer Sysop
    >> >>
    >> >> Novell does not officially monitor these forums.
    >> >>
    >> >> Suggestions/Opinions/Statements made by me are solely my own.
    >> >> These thoughts may not be shared by either Novell or any rational
    >> >> human.
    >> >>
    >> >> "mjgalloway" <[email protected]> wrote in message
    >> >> news:[email protected]...
    >> >> >
    >> >> > With ZfD 7 I was able to add Windows application shortcuts in the
    >> >> the
    >> >> > Application Object. I've been searching on how to do this with
    >> ZCM
    >> >> > bundles and so far I'm stumped. I don't see any actions related
    >> to
    >> >> > creating a shortcut, nor can I find any reference to shortcuts in
    >> >> the
    >> >> > documentation.
    >> >> >
    >> >> > I've also tried uploading a shortcut file to the server, but the
    >> ZCC
    >> >> > simple follows the path within the shortcut, attempting to upload
    >> >> the
    >> >> > files the shortcut targets instead.
    >> >> >
    >> >> > Has anyone figured out a way to do this? Am I missing something
    >> >> > obvious?
    >> >> >
    >> >> >
    >> >> > --
    >> >> > mjgalloway
    >> >> >
    >> >>
    >> ------------------------------------------------------------------------
    >> >> > mjgalloway's Profile: 'NOVELL FORUMS - View Profile: mjgalloway'
    >> >> ('NOVELL FORUMS - View Profile: mjgalloway'
    >> (http://forums.novell.com/member.php?userid=4877))
    >> >> > View this thread: 'Create Windows Shortcuts - NOVELL FORUMS'
    >> >> ('Create Windows Shortcuts - NOVELL FORUMS'
    >> (http://forums.novell.com/showthread.php?t=323354))
    >> >> >
    >> >
    >> >
    >> > --
    >> > seuferer
    >> >
    >> ------------------------------------------------------------------------
    >> > seuferer's Profile: 'NOVELL FORUMS - View Profile: seuferer'
    >> (http://forums.novell.com/member.php?userid=15474)
    >> > View this thread: 'Create Windows Shortcuts - NOVELL FORUMS'
    >> (http://forums.novell.com/showthread.php?t=323354)
    >> >
    >
    >
    > --
    > seuferer
    > ------------------------------------------------------------------------
    > seuferer's Profile: http://forums.novell.com/member.php?userid=15474
    > View this thread: http://forums.novell.com/showthread.php?t=323354
    >

  • Every time I try and download a microsoft office file, I get an error saying: Windows cannot find 'C:\Users\Tara\Appdata\Local\Temp\*FILENAME*. This happens will all Office files. Suggestions for fixing this?

    I choose download when asked what to do with the file.

    Try removing the archive file from Outlook, rename it and then readd, then restart Outlook and see if the error goes away.
    Adrienne S
    Tech Support
    Motivators Promotional Products

  • Executing Windows shortcuts through getRuntime.exec

    Hello,
    I am writing a desktop component in which you should be able to drag and drop local windows icons and they will become an icon on my desktop.
    I am able to get the shortcut .lnk location by accessing the list flavor from the native drag and drop... for example if i drop a native shortcut i get:
    C:\Documents and Settings\pankaj\Desktop\Shortcut to eclipse.lnk
    i can even access the file system icon by:
              ImageIcon iconImage = (ImageIcon)FileSystemView.getFileSystemView().getSystemIcon(execFile);
              iconImage.setImage(iconImage.getImage().getScaledInstance(32,32,Image.SCALE_AREA_AVERAGING));
    but i tried to execute the .lnk command using getRuntime.exec(cmd); it didnt work obviously.. how can make this work?
    you can check out info on my project here:
    http://www-unix.globus.org/cog/wiki/moin.cgi/JavaCogDesktop
    thanks.
    pankaj

    Did you try "start"?
    new String [] { "cmd" , "/c", "start" , "path-to-my-shortcut" }

  • Filenames getting truncated in Save for Web AppleScript

    Hey all, running CS4 on an Apple Macbook Pro (using OS X 10.5.6). I am creating an AppleScript that saves out a number of files with different filenames using save for web. The problem is that Photoshop CS4 is truncating the filename, and using a shorter filename is not an option (there is identifying info in the filename that I need to retain). Is there a way within the script I can set it to allow longer filenames? My current save for the web script line looks as follows:
    export current document in file filename as save for web with options {quality:60, web format:JPEG}
    What happens is that a filename like this:
    CANON-PRO8000MKII-ideal-ideal-24.jpg
    gets cut down to this:
    CANON-PRO8000MKII-ideal-ideal#0
    I believe that there there is a PShop bug here that has a hard-coded limit on the filename, but which does not happen if you enter  the file name manually: if I go into the save for web dialog and enter the full filename, it works fine.  Any ideas?

    I recall having this problem too, my solution was to truncate the file name in the script prior to the save, then rename the saved file.
    e.g.
    if length of theNewFileName > 31 then
    set theTempFileName to theNewFileName
    set theNewFileName to (text 1 through (31 - (length of theFileExtension) - 1) of theNewFileName & "." & theFileExtension) as string
    end if
    set theNewFile to (saveToFolder & theNewFileName) as string
    -- Save the file here
    if theTempFileName = "" then
    -- File name wasn't truncated
    else
    -- Rename truncated file
    tell application "Finder"
    try
    set name of (theNewFile as alias) to theTempFileName
    on error errMsg number ERRNUM
    display dialog "Error renaming file - " & errMsg
    end try
    end tell
    end if

  • JNLP file not opening in Windows 8 and IE 10

    I am trying to launch the ROES ordering tool through WHCC prints and it has always worked on my other IE 10 through Windows 7 but on my new computer with Win 8 I cannot get it to launch because of the JNLP file not opening... and it won't work on desktop
    mode either... What do I need to do??

    Hi,
    Have you installed the java Runtime Environment?
    If not, I would also suggest you to refer to the link to install the latest version of Java:
    http://www.java.com/en/
    Please note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Then follow the link to set default programs as Java for the file:
    Choose the programs
    Windows uses by default
    http://windows.microsoft.com/en-US/windows-8/choose-programs-windows-uses-default
    Hope this helps,
    Ada Liu
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

Maybe you are looking for

  • Import is not available all other actions are active but not import help?

    Import is not available all other actions are active but not import help? I wish to import bookmarks from internet explorer, I am using windows 7

  • New Macbook Pro will not charge.

    I have a 13" MacBook Pro that was purchased new about a month ago. Today, I noticed that it wasn't charging. I plugged it into a couple different outlets, but the indicator light on the power cord won't come on at all. Any ideas why? Thanks for your

  • Cannot set currency in web version of a form

    Hi, We have a multi currency planning application and we have issues trying to set the currency at cell level when opening the form in EPMA. When opening the same form in Smartview it works. Basically if I set a cell to 210 SGD, the base currency bei

  • Can swing be used on web / only application?

    I am new to swing... Can I store the data from my database in a swing table on a web page ? Can I create a form with all swing components ? I have heard that swing is used for application development.. I wanted to know that if you created a frame/win

  • Read single record in a table

    Hi all, I hava a table and when I create a new record I have to read the previous one for some check. Which is the script to read a particular record in a table? THANKS ENZO