install4j: Whitespaces in vm-parameters via vmoptions (OSX service launcher) generating error - install4j

We are generating a service launcher for our app. In the vmoptions file we do set a parameter which contains whitespaces (e.g. file path):
-Dmy.parameter=my file path
This does not seem to work in the service launcher für OSX (but does for Windows).
Also putting the value in quotes does not work:
-Dmy.file.path="my file path"
Both will generate an error stating "main class not found: file.path"

This is a limitation of the service launchers on Mac OS X that will be fixed in install4j 6.
As a workaround, put the VM parameter with the space in the first line in the .vmoptions file, then it should work.

Related

Cannot run file in google drive directory (using file syncing) because of white space in 'My Drive'

I'm writing a game in Lua using Löve2D using google drive syncing for backup, meaning I am directly editing the file in my drive. This means the file path is "G/My Drive/Truck" (Truck is the name of the game folder). When I open the folder in VS Code it works fine and I can access and edit everything, but when I actually try to run the main.lua with the alt+L command I get this error:
boot.lua:577: Cannot load game at path 'g:/My'.
Make sure a folder exists at the specified path.
I'm not sure if it's Löve itself or if it's VS Code which can't cope with the white space.
I have previously accessed, edited and run the file with no issue on a different computer, but am now trying to do so on my laptop, and am encountering this issue.
OS is Windows 11.
I've tried opening "G/My_Drive/Truck" which doesn't work. Since it's google drive I can't just rename it to remove the whitespace.
According to the error message you've provided, Lua does not receive a full path to your folder, just a small piece: 'g:/My'
This usually happens when you pass a string that contains a whitespace by command line like this:
love.exe game.love G:/My Drive/Truck
How to fix:
love.exe game.love "G:/My Drive/Truck"
If that does not help, then post more details: how do you launch it, where path to your gdrive folder is stored.

install4j launcher issue on Mac OSX app store application

We’re using install4j to create installers for our Java application, PDF Studio.
We’re currently trying to submit our application to the Apple store and for this, need a pkg file. We’ve created a pkg file from the Application folder that is created after running the dmg installer created by install4j and are working on removing one by one all the warnings and errors reported by the Apple store.
One issue we are having is that symlinks are not allowed by the Apple store and the JRE contains a symlink for a file called libjli.dylib.
When we try to remove the symlink or replace it with the actual file, the i4j launcher for our application is broken.
When we remove the file from the install folder:
rm /Applications/PDF\ Studio\ 2018.app/Contents/PlugIns/jre.bundle/Contents/MacOS/libjli.dylib
We get an error message on launch saying "Java SE 8" couldn't be loaded because it's executable couldn't be located."
If we try to copy the file to the symlink location:
cp /Applications/PDF\ Studio\ 2018.app/Contents/PlugIns/jre.bundle/Contents/Home/jre/lib/jli/libjli.dylib /Applications/PDF\ Studio\ 2018.app/Contents/PlugIns/jre.bundle/Contents/MacOS
Then the launcher fails with no error message dialog.
If we run with install4j log enabled:
INSTALL4J_LOG=yes /Applications/PDF\ Studio\ 2018.app/Contents/MacOS/JavaApplicationStub
Then it will print "Error: could not find libjava.dylib."
Has anyone tried to do this and made it work?
It seems like the launcher is looking under /MacOS/libjli.dylib. We think it is the JavaApplicationStub executable file that decides where to look which is created by install4j.
Is there is a way to set where the launcher looks for the jre.bundle executable libjli.dylib?
You can extract the DMG and edit the Info.plist file so that it contains
<key>CFBundleExecutable</key>
<string>../Home/jre/lib/jli/libjli.dylib</string>
We will check if we can do this in general.

Kotlin compiling from command line

I need to compile some Kotlin files and run them as described at Kotlin documentation
However, my command line keeps saying this:
C:\Users\name\Documents\Projec\Kotlin>kotlinc
'kotlinc' is not recognized as an internal or external command,
operable program or batch file.
I am a 64-bit Windows 7 user.
So I downloaded the latest version of the compiler (1.0.6 ATM) and extracted the files into my Program Files folder.
My variable path is set like this:
PATH=C:\Program Files\Java\jdk1.8.0_101\bin; C:\Program Files\kotlinc\bin;C:\Program Files (x86)\Android\android-sdk\platform-tools;
At this point I have no idea, I tried two versions of the compiler and tried changing the path variable few times.
Any help appreciated.
Windows PATH is semicolon-delimited; white space is not trimmed.
You need to remove the space between ; and C:\Program Files\kotlinc\bin\ in order for the directory to be added correctly to PATH.

how to configure less in eclipse?

I downloaded the plugin from http://www.normalesup.org/~simonet/soft/ow/eclipse-less.en.html.
and installed in on eclipse however when I try to compile the less to css I get this error
Cannot be launched because of an I/O exception
Cannot run program "lessc": CreateProcess error=2, The system cannot find the file specified
can anyone whose successfully installed this guide me in the right direction ? Also xtext is installed already.
There is a similar issue for the lessc GitHub repo: issues/213
I added a new launch configuration as follows:
LESS command: lessc (existing)
Compress the generated CSS file (existing)
Use this launch configuration as default
Your have to change the "LESS Command".
Please filling your "lessc" physical path, just like "C:\Users\[Yourname]\AppData\Roaming\npm\lessc.cmd"
(Windows 7, node.js standard installer)
That means you must indicate the full path of lessc.cmd

Run node-webkit project in Netbeans 7.4

I am trying to configure Netbeans IDE 7.4 for node-webkit development.
It is excellent IDE but I want to run my projects with F6 button. To do this I added NW.EXE as additional browser (executable is located outside project folder).
After this I have a problem with execution arguments. NW.EXE expects a folder path to be specified as an argument, but I cannot leave empty field of Start File in project settings and the Project URL has to start with either http:// or file:// while Node-webkit needs a path like C:/path_to_app
Does any method exist to deal with this feature?
In short, you can work this around by creating a batch program and let it strip the file name down to the path name part, to be fed to nw.exe, as it requires.
Unfortunately, as you said, we don't have full control over the way the main file of the project is passed to the browser, hence some further actions (in addition to the creation of the batch file) are needed.
This is how I got it working after a bit of struggle:
added nw.exe to the system %PATH% variable (optional, just for ease of access)
created nw.bat in the same folder as nw.exe, and filled it with this content:
#echo %1
start nw.exe %~d1%~p1
The first line of this batch file is just to inspect the actual parameter that is getting passed to the batch file.
The second line uses start to invoke nw.exe without having to wait for its return (you may need to specify the full path to nw.exe, if you didn't add it to the system %PATH% variable).
The second line also passes to nw.exe the drive part of the parameter (extracted from %1 by %~d1) concatenating it to the path of the parameter (extracted from %1 by %~p1).
For instance, my last run from within NetBeans gave this output:
D:\node\test\index.html
D:\node\test>start nw.exe D:\node\test\
Then I needed something to tie the NetBeans run button to an arbitrary executable, and luckily I found a perfect fit.
So here is how I went on:
installed the Node.js Projects plugin from Timboudreau Update Center
went to Options > Miscellaneous > Node.js and set the Node.js Binary field to point to my nw.bat file
In my project, I've also taken care to put package.json in the same folder of index.html (being that that's the main file of my package, and that's what will be fed to the batch file).
Now pressing F6 on my NetBeans installation happily runs my node-webkit project without any further ado :-)