install4j installs old/strange vmoptions - install4j

My vmoptions used to specify -Xmx300m but later we updated it to -Xmx512m.
My install4j configuration now contains:
<vmOptionsFile mode="content" overwriteMode="5" fileMode="644">
<content># Enter one VM parameter per line
# Adjust maximum memory usage to 512MiB
-Xmx512m</content>
</vmOptionsFile>
Now, even if I manually uninstall the previous version and whatch the vmoptions file being deleted, installing the version I just built with the install4j file above gives me this vmoptions file:
# Enter one VM parameter per line
# Adjust maximum memory usage to 512MiB
-Xmx300m
Notice how the comment says 512MiB while the parameter specifies 300m.
This does not happen if I use the same installer within a fresh Windows VM.
I have not the slightest clue how this can happen. Any idea?

Related

Kafka error while running command to start zookeeper

I have kafka installed at following location
C:\Users\username\work\data\kafkadirectory\kafka\apache-kafka\kafka
Now, when I run following command at above location:
path/to/zookeeper-server-start.bat config\zookeeper.properties
I get error:
The input line is too long.
The syntax of the command is incorrect.
As can be seen, directory names don't include version(google search tells to get rid of version in directory names).
Still I face the issue.
Try the below-mentioned steps
Better to move the folder to short path 'C:\kafka\' (Reducing folder hierarchy)
Restart the command prompt to reset the classpath variable
Use PowerShell which have longer support to the classpath

Docker build for Matlab Compiler Runtime on Windows (non-interactive installation)

I notice that some steps in the Docker build takes more time than manually executing the same command in the container. To provide some context, the process of installing Matlab Compiler Runtime (MCR) is as follows:
Download MCR installer from MathWorks website
Unpack installation files
Run /bin/win64/setup.exe -mode silent -agreeToLicense yes (non-interactive install)
I created the following Dockerfile to set up MCR on a Microsoft windowsservercore image including dotnet-framework.
# Line 1: Use dotnet-framework base image
FROM microsoft/dotnet-framework
# Line 2: Download MCR installer (self-extracting executable) and save as ZIP file
ADD https://www.mathworks.com/supportfiles/downloads/R2014b/deployment_files/R2014b/installers/win64/MCR_R2014b_win64_installer.exe C:\\MCR_R2014b_win64_installer.zip
# Line 3: Use PowerShell
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# Line 4: Unpack ZIP contents to installation folder
RUN Expand-Archive C:\\MCR_R2014b_win64_installer.zip -DestinationPath C:\\MCR_INSTALLER
# Line 5: Run the setup command for a non-interactive installation of MCR
RUN Start-Process C:\MCR_INSTALLER\bin\win64\setup.exe -ArgumentList '-mode silent', '-agreeToLicense yes' -Wait
# Line 6: Remove ZIP and installation folder after setup is complete
RUN Remove-Item -Force -Recurse C:\\MCR_INSTALLER, C:\\MCR_R2014b_win64_installer.zip
I build a new image using the command:
docker build -t analytics/dotnet-mcr --no-cache --force-rm .
The installation of MCR is very slow, when compared to stopping at Line 4 and then manually running the MCR setup from a container based on the ensuing image (using the exact same PowerShell command)... any reason why needs an extra 3-4 minutes when performing the same step via the Dockerfile based build?
Note: Best practices suggest using a download utility versus using ADD, but I don't have any constraints related to image size since I am removing intermediate images as well as deleting the downloaded installer and unpacked installation folder. Plus, I like seeing the cleaner download progress bar of the ADD command.
I appreciate any improvements/optimizations that may be suggested.
Docker uses layers. According to it documentation each RUN command will create a layer. In your scenario, each layer will store the data related to the RUN command, so removing MCR_R2014b_win64_installer.zip as separate step will cause extra space in previous layers. I would recommend reducing RUN commands where it is possible.
Please check repo for more help.

how can i run the jboss server via windows commands without getting error

my java installed in C:\Program Files\Java\jdk1.7.0_01\bin
Jboss server installed in D:\jboss-as-7.1.1.Final\bin
Already i have set the environment variables for your reference.
C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Python27;C:\Python27\Scripts; C:\Program Files\Java\jdk1.7.0_01\bin
while i started to run the Jboss server7.1 via commands prompts getting error message "JAVA_HOME is not set".
Please provide me a solution
To overcome this message, set JAVA_HOME in standalone.conf.bat and domain.conf.bat file.
rem #
rem # Specify the location of the Java home directory (it is recommended that
rem # this always be set). If set, then "%JAVA_HOME%\bin\java" will be used as
rem # the Java VM executable; otherwise, "%JAVA%" will be used (see below).
rem #
set "JAVA_HOME=C:\Program Files\Java\jdk1.7.0_01\"

Mac OS X 10.11 - Add Postgres to $PATH Unsuccessful

I am trying to install Postgres in order to use Heroku.
I am following the instructions in the Heroku tutorial, and after Postgres installation (which was successful), it says to configure my .bash_profile to allow for Postgres command line functionality.
I am following the instructions here, but I am unable to successfully add this line:
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
That folder does in fact contain "psql" on my computer, so it should work. Here is my current .bash_profile:
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
# The next line updates PATH for the Google Cloud SDK.
source '/Users/user/google-cloud-sdk/path.bash.inc'
# The next line enables shell command completion for gcloud.
source '/Users/user/google-cloud-sdk/completion.bash.inc'
I tried to add the Postgres line to the end of that file, but it is not working. After searching online, there does not seem to be consensus on how to add PATHs to .bash_profile. I have tried many versions listed, but none have worked.
Please let me know if I'm doing this incorrectly!
Add this line to the end of your .bash_profile:
export PATH=/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH
This makes the search of a binary to look in that location "BEFORE the rest of the PATH"
Kill all instances of terminal and open it again, then it should work.
Try which xxx where xxx is the name of some binary inside /Applications/Postgres.app/Contents/Versions/latest/bin and check if it's returning that location.
Tell me if it works.

lost PATH while trying to set custom winlogon shell in WindowsXP

I have changed the shell key in windows registry to gain custom shell (Kiosk usage):
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\Winlogon]
I set shell key to a batch file which runs two applications as below:
start "myFirstAppTitle" "myAppPath\myApp1.exe"
start "mySecondAppTitle" "myAppPath\myApp2.exe"
Each application runs but the second application which needs some files to be excuted throws an error which says could not find dependency files. whereas the dependency files are adjoining to the exe file and the mentioned app works fine, when starts from startup.
Meanwhile when i run the batch file manually it rusn fine.
I added the PATH command to the batch file but it did't work too.
Change the batch file to this:
set PATH=%PATH%;C:\MyAppPath
start "myFirstAppTitle" "myApp1.exe"
start "mySecondAppTitle" "myApp2.exe"
If you start executables without an absolute path, the path is relative to the current working directory. Also, when you specify an executable with a relative path, %PATH% is not searched for a matching subfolder with a matching executable.
Since the script worked when you manually started it, your working directory probably was C:\. However, when run at logon as a replacement shell, the working directory is most likely "%SystemRoot%\system32".
The problem solved strangely, i removed the title parameter of start command and it worked. In fact i used start command this fashion:
set PATH=%PATH%;C:\MyAppPath
start myapp.exe
start myapp2.exe