Close Windows CMD console on play start - batch-file

'm trying to start my play app via "play start" command in windows but the CMD console remains open after server started. Also system.err still redirected to this console.
And if I close this windows the application's java process also will be closed.
Framework version: 1.2.4/1.2.5.3
Platform you're using: Windows 2003, 7 (X86, X64)
Reproduction steps:
1) Create Play! app
2) Start it via bat file
set JAVA_HOME=C:\Java\jdk1.7
cd /d "%dp~0%TestApp"
call "%dp~0%../play-1.2.4/play" start

You can use
start "" "%dp~0%../play-1.2.4/play" start
However, it looks like play is a console application and thus will just create a new window anyway.

Related

Programs that want to be packaged with exe4j use javaw to run

How to set exe4j to use javaW to execute the program?
I tried to use the GUI Application and still use java to run the program, which will cause my program to not execute normally.If you try to rename javaw to java, you will get an environment error.
exe4j creates launchers that use JNI to create the JVM. They do no call java or javaw. An exe4j launcher in console mode behaves similarly to java and an exe4j launcher in GUI mode behaves similarly to javaw.

Daydream View Controller Emulator won't work with Google VR SDK 1.1 and Unity 5.6 beta for Linux

I can't get the controller emulator to work with Google VR SDK 1.1 & Unity 5.6b3 under Arch Linux 64-bit. If I load the GVRDemo scene in Unit and click the play button to enter Play Mode, the console shows the following:
"Android Debug Bridge (adb) command not found.
Verify that the Android SDK is installed and that the directory containing adb is included in your PATH environment variable."
In Windows, you have to add the directory containing the Android Debug Bridge (adb) program to the PATH environment variable in Windows itself (not in the Unity program). Once you do that, the Controller Emulator works fine in Windows. You have to do the same in Linux, evidently, to get Unity to locate adb, and therefore get the Controller Emulator phone working for testing the game.
I've added the following line in my .bashrc and .profile files in my home directory:
"PATH=/home/jesse/Android/Sdk/platform-tools/:$PATH"
This, however, doesn't fix the issue.
I've also added the root directory of the Android SDK to my Unity Preferences > External Tools section.
I don't know how to get Unity and Google VR SDK to recognize the directory containing adb to the PATH environment variable that Unity needs to make the Controller Emulator work.
Is anyone else having this issue? Is there a fix or work-around?
I was able to locate the culprit and modify Google VR SDK scripts to make it work! Turns out there was an issue in the code of the script file titled "EmulatorClientSocket.cs" regarding non-Windows machines. Here's what I changed, and why:
Originally, in line 111 and 112 of this script, it read:
stringprocessFilename="bash";
stringprocessArguments = string.Format(" -l -c \"{0}\"", adbCommand);
The context is that when Windows is not present (forgive my layman's terms -- I've only started learning coding a month ago) the command to process is this: bash -l -c "adb forward tcp:7003 tcp:7003". The problem is when the -l option is used in the command, the command is interpreted as if coming from a login shell, which - I believe - means that bash isn't looking at the custom environment variables set in the user's .bashrc and .profile files in their home directory. Without looking at those files, bash can't locate the adb command (try running the bold command above in a terminal, and the result will be a prompt saying adb command not found).
To fix it, I simply removed the -l option from line 112, and, voila! Everything works like a charm! Lines 111 and 112 now look like this:
stringprocessFilename="bash";
stringprocessArguments = string.Format(" -c \"{0}\"", adbCommand);
The fix will work when running "unity-editor" or "unity-editor-beta" from the Terminal or Xterm, but running it from the application menu will still produce the adb error and Controller Emulator will not work.

How do I open a file in its default program by using the CLI in GitBash on Windows 7?

I'm currently using GitBash on Windows 7 to play around with the command line interface and would be very interested to know how to use GitBash to open a file/document in its default program.
You can use start to open a file using its default application. For example:
start some-image.jpg
start some-document.pdf
Start gives me permission issues on my work machine. However the explorer command works for me.
explorer some-image.jpg

Cannot get the cakephp 2.3 console running on xampp on Windows 7

I am running a cakePHP app which is located in C:xammp\htdocs\scheduling. I am running it on xampp on Windows 7. I have added the following environment variables:
C:\xampp\htdocs\scheduling\app\Console\;C:\xampp\php;
but still cannot get the cakephp console in operation. When I navigate to C:\xampp\htdocs\scheduling\app and try to get the cake console or cake help, I am given a message that it is not recognized as an internal or external command.
And yes, I did reload the cmd after adding the environment variables.
Its Easy just follow the steps as mentioned below:
put Your PHP Path in environment Variable
Open Command Prompt with Admin priviliges
change directory to C:\xampp\htdocs\your_appname\app\console
Type in " Cake Bake " and run
And You Are ready to go...................Happy Baking...........................
Just reloading the cmd is not enough, you need to either reboot your system or add it once manually before you are ready to reboot:
set Path="%Path%;c:\xampp\htdocs\scheduling\app\Console"
If all else fails, you can always call it in full from your app dir:
Console\cake bake
It's a little bit more typing, but this will work regardless of the Path variable settings.

Why do I get "The Application Failed to initialize properly" when calling candle?

I am writing a batch script in which I need to run a candle command:
candle.exe - present in wix installation 'bin' directory
I have set the path during my batch file load to the wix installation directory, and have checked writing
candle.exe abc.wxs -dplatform=x86 -ext WixUtilExtension
But on Windows XP it gives me an error:
The Application Failed to initialize properly (0xc00001235)" .Click on OK To terminate
On Windows 7, candle.exe works fine.
How can I resolve this?
I guess it is because i have not specified as to how to deal with different OS
This actually seems to be a result of not having .Net framework installed. Try installing .net 3.5 for Windows XP, or later for Windows 7 +.

Resources