Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Izpack fails with 'There is no script engine for file extension ".js",

On test machine using Izpack 5 Beta 11 if I start install.jar using a 64bit winrun4j exe running bundled 64 bit java then Izpack complains

There is no script engine for file extension ".js", then complains The installer could not launch with administrator permissions, then an attempt to install into the default installation directory fails because you don't have admin permissions, installation to another folder outside of C:/Program Files completes okay

Whereas if I run it with 32bit winrun4j installer running 32 bit java it works fine.

if I just run install.jar directly without the exe wrapper

i.e java -jar install.jar

it gives these errors using both 32bit JVM and 64bit JVM.

so my only working solution at the moment is installation with 32bit exe wrapper, but I also need 64 bit wrapper.

So questions are

  1. Why is 32bit exe working and 64 bit exe not working
  2. Why does neither 32bit or 64bit if I try and install without the wrapper.

Followup

I found this thread about the javascript error (but not Izpack) and found that .js files were associated with Utlradedit, the editor I use for editing most file types.

Simply unassociating .js with Ultraedit means that now when I run

  • java -jar install.jar using 32bit java on 32bit install.jar
  • java -jar install.jar using 64bit java on 64bit install.jar
  • 32 bit winrun4j wrapper.

it now works :)

But 64bit winrun4j now fails to start the installation and doesnt work at all, if I run from Command Window I can see that instead

of running

wscript C:\Users\MESH\AppData\Local\Temp\Installer.js   c:\Code\WidgetReleases\1.0_Beta_2\widget-windows64\JVM64\bin\javaw.exe   -Dizpack.mode=privileged -jar  C:\Code\WidgetReleases\1.0_Beta_2\widget-windows64\install.jar 

they ran

wscript C:\Users\MESH\AppData\Local\Temp\Installer.js   c:\Code\WidgetReleases\1.0_Beta_2\widget-windows64\JVM64\bin\javaw.exe   abort exit   -Dizpack.mode=privileged -jar   :\Code\WidgetReleases\1.0_Beta_2\widget-windows64\install.jar 

So follow up questions are:

  1. Why does simply associating filetype with an editor break this javascript stuff, I can imagine that this or a similar problem could effect alot of users.
  2. Why would running from my 64 bit wrapper cause installer.js to run Abort Exit
like image 239
Paul Taylor Avatar asked Oct 03 '12 14:10

Paul Taylor


1 Answers

There are four questions asked here:

  1. Why is 32bit exe working and 64 bit exe not working
  2. Why does neither 32bit or 64bit if I try and install without the wrapper.
  3. Why does simply associating filetype with an editor break this javascript stuff, I can imagine that this or a similar problem could effect alot of users.
  4. Why would running from my 64 bit wrapper cause installer.js to run Abort Exit

I will attempt to answer them:

  1. Errors and bugs sometimes in programs that are supposed to 'seamlessly' handle both 32- and 64-bit; one example is Symantec's SEP definition repair program - it works sometimes but not all. Your comment confirms these bugs, and you've even identified a competing program that does not error in this 32/64 handling: "Haven't solved this problem but have worked around it by running the installer using launch4j instead of winrun4j". Congrats! :)

  2. I suspect the requisite app/wrapper is not in your system's PATH. Two folders in your path are C:\WINDOWS, and C:\WINDOWS\SYSTEM32. At the command prompt, type the word SET (caps not needed). An alphabetically-sorted list of variables appear. In the one that says PATH= look for the full folder path of wrapper that you expect to launch your app. It's likely not there. It can be added if you like.

  3. Good question, but there's a good reason: by associating a filetype to open with a program, you're telling your computer to always open the file, in this case ending with .js, with a file editor. It's doing what you told it to do, not what you intended. A popular way to get what you intended is to re-associate the file with the program it had before (you would likely know which one is best), and to edit the file, add your favorite JS editor to the "Open With..." option in Windows Explorer's right-click menu. I can find and link to a page or two on how to do this, if you like.

  4. I believe this is strongly tied to question and answer #1.

Let me know if this helps.

like image 60
Lizz Avatar answered Sep 17 '22 12:09

Lizz