san-angeles project - vs-android

i was trying to run the san-angeles example for vs-android ...
i have winxpsp3 and vs 2010 installed on my machine ..
these are the steps for installation ... my question is :
in this step .... :
NDK Setup
Download the NDK from here: http://developer.android.com/sdk/ndk/index.html
Unzip it somewhere, and note the root directory.
You need to set an environment variable named ANDROID_NDK_ROOT which points to this directory. This can be done from the command line:
setx ANDROID_NDK_ROOT c:\android-ndk-r6
How to achieve the above line ( setx ANDROID_NDK_ROOT c:\android-ndk-r6 ) ???

ok i got it :
just goto my computer (right-click) navigate to properties and then (Advanced Tab) choose
Enviroment Vairiables => system variable => New => Write down (ANDROID_NDK_ROOT) THEN Value
(c:\android-ndk-r7) if you the version is r7 ....
it depends on your NDK version .... and same is for Java - Ant - SDK
JAVA_HOME => Java Dir
ANT_HOME => Apache Ant Dir

Related

Why doesn't stack (installed by ghcup) find msys (installed by ghcup) on Windows

On my Windows 10 system, I set up Haskell using GHCup. I installed ghc, cabal and stack. Now I am trying to install a package depending on network. Network needs msys for building, but it is obviously not detected:
C:\Users\Michael\source\repos\dummy>stack install network
network> configure
network> [1 of 2] Compiling Main ( C:\Users\Michael\AppData\Local\Temp\stack-c2e699ee2698c622\network-3.1.1.1\Setup.hs, C:\Users\Michael\AppData\Local\Temp\stack-c2e699ee2698c622\network-3.1.1.1\.stack-work\dist\274b403a\setup\Main.o )
network> [2 of 2] Compiling StackSetupShim ( C:\Users\Michael\AppData\Roaming\stack\setup-exe-src\setup-shim-Z6RU0evB.hs, C:\Users\Michael\AppData\Local\Temp\stack-c2e699ee2698c622\network-3.1.1.1\.stack-work\dist\274b403a\setup\StackSetupShim.o )
network> Linking C:\Users\Michael\AppData\Local\Temp\stack-c2e699ee2698c622\network-3.1.1.1\.stack-work\dist\274b403a\setup\setup.exe ...
network> Configuring network-3.1.1.1...
network> setup.EXE: The package has a './configure' script. If you are on Windows, This
network> requires a Unix compatibility toolchain such as MinGW+MSYS or Cygwin. If you
network> are not on Windows, ensure that an 'sh' command is discoverable in your path.
network>
Although documentation seems sparse on it ("you might want to look into extra-path"), I configured stack seemingly correct to have the Shell provided by MSys2 in the path:
C:\Users\Michael\source\repos\dummy>type c:\Users\Michael\AppData\Roaming\stack\config.yaml
templates:
params: null
system-ghc: true
install-ghc: false
skip-msys: true
extra-path:
- 'C:\ghcup\msys64\usr\bin'
- 'C:\ghcup\msys64\mingw64\bin'
extra-include-dirs:
- 'C:\ghcup\msys64\mingw64\include'
extra-lib-dirs:
- 'C:\ghcup\msys64\mingw64\lib'
The MingW path is correct. A more direct test of stack shows that the path isn't applied:
C:\Users\Michael\source\repos\dummy>stack exec sh
Executable named sh not found on path: [".","C:\\Users\\Michael\\source\\repos\\dummy\\.stack-work\\install\\38482417\\bin","C:\\Users\\Michael\\AppData\\Roaming\\stack\\snapshots\\6c93f868\\bin","C:\\Users\\Michael\\AppData\\Roaming\\stack\\compiler-tools\\x86_64-windows\\ghc-8.10.7\\bin","C:\\ghcup\\bin",...,"C:\\WINDOWS\\system32","C:\\WINDOWS","C:\\WINDOWS\\System32\\Wbem","C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\",...,"C:\\Program Files\\Git\\cmd",...,"C:\\ghcup\\bin"]
I redacted parts of the path output that are unrelated to the problem. Obviously, no mention of the MSys directory here. Also obviously, sh.exe is not found, although it is where I expect it:
C:\Users\Michael\source\repos\xilinx>dir c:\ghcup\msys64\usr\bin\sh.exe
Datenträger in Laufwerk C: ist Windows
Volumeseriennummer: xxxx-xxxx
Verzeichnis von c:\ghcup\msys64\usr\bin
19.05.2021 07:47 2.201.842 sh.exe
1 Datei(en), 2.201.842 Bytes
0 Verzeichnis(se), ??.???.???.??? Bytes frei
This is a known issue with Stack. In windows, environt variable names are case-insensitive, but the base library "rio" used by stack doesn't ignore case when looking up environment variables. Under certain circumstances, the program path environment variable is called Path, not PATH. This is the case on the system the issue was observed on:
C:\Users\Michael\source\repos\dummy>set | findstr /i path
HOMEPATH=\Users\Michael
Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;...;C:\ghcup\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
In this case, stack fails to expand the PATH variable, so the correct extra-path entries in config.yaml are ignored.
To fix the problem, use the windows environment variables dialog to adjust the spelling of the systemwide path variable. The spelling of the per-user path variable doesn't matter, as the system path is applied first, and merging the user path entries into that variable keeps the spelling set up by applying the system path.

Typesafe activator: Java JDK can't be found

I am trying to run the typesafe activator on Windows 8.1 x64. It keeps saying I don't have a valid JDK installation:
A Java JDK is not installed or can't be found.
JAVA_HOME = "C:\Program Files\Java\jdk1.7.0_45\bin"
Please go to
http://www.oracle.com/technetwork/java/javase/downloads/index.html
and download a valid Java JDK and install before running Activator.
If you think this message is in error, please check
your environment variables to see if "java.exe" and "javac.exe" are
available via JAVA_HOME or PATH.
Press any key to continue . . .
I have my JAVA_HOME set to:
C:\Program Files\Java\jdk1.7.0_45\bin
Which is a valid location.
JAVA_HOME should just point to the JDK directory, not bin.
Here was my workaround:
Add the following code to your activator.bat on line 112:
if "%JAVAOK%"=="false" (
set "_JAVACMD=C:\Program Files (x86)\Java\jdk1.6.0_91\bin\java.exe"
set "JAVAOK=true"
set "JAVA_VERSION=1.6"
)
Or where ever your java.exe is located at, and whatever your Java Version is.
Your code should now look like:
rem BAT has no logical or, so we do it OLD SCHOOL! Oppan Redmond Style
set JAVAOK=true
if not defined JAVAINSTALLED set JAVAOK=false
if not defined JAVACINSTALLED set JAVAOK=false
if "%JAVAOK%"=="false" (
set "_JAVACMD=C:\Program Files (x86)\Java\jdk1.6.0_91\bin\java.exe"
set "JAVAOK=true"
set "JAVA_VERSION=1.6"
)
if "%JAVAOK%"=="false" (
echo.
When I typed "path" in cmd, I got my classpath, but "java_home", "java -v", etc didn't work. I don't know why I am having that issue, but my (ugly) workaround worked.
I had a similar problem on Windows 7 64b. The problem solved by changing the installed directory from 'C:\Program Program..' to a directory without space like 'c:\java'.
So the solution is: Installing Java to a path without spaces.
I hope it can help.
This worked for me:
Open a Command Prompt as administrator
Navigate to the folder with activator.bat
Type 'activator ui' without the '
Press enter

Configuring Maven for Windows 7, Files\Java\jdk1.6.0_23"" was unexpected at this time error

I am trying to configure Maven on my Win 7 machine. I am following these steps:
http://maven.apache.org/download.cgi
I downloaded Maven into folder
c:\Program Files\Apache Software Foundation\apache-maven-3.0.5\
I set all environmental variables as described in the URL above
JAVA_HOME = C:\Program Files\Java\jdk1.6.0_23
M2_HOME = c:\Program Files\Apache Software Foundation\apache-maven-3.0.5\
M2 = %M2_HOME%\bin
PATH = %M2%; C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell; %JAVA_HOME%\bin ; C:\Program Files\Java\jdk1.6.0_23
But when I enter:
C:\Users\Andrei>mvn --version
I get a :
Files\Java\jdk1.6.0_23"" was unexpected at this time.
Can you please help me with this issue?
Let me know please if you need more details.
Thanks in advance!
This one solved it for me: http://www.xinotes.net/notes/note/559/
It is a problem with how the JAVA_HOME path is being set.
Set the path without quotes like this:
set java_home=c:\Program Files\Java
Or using the 8 char syntax for folder names like this:
set java_home="c:\Progra~1\Java"
To solve the same issue
I did:
SET M2_HOME=C:\Program Files\Apache Software Foundation\apache-maven-3.2.3-bin\apache-maven-3.2.3
Then
SET JAVA_HOME=C:\Program Files (x86)\Java\jre7
And finally I added to the beginning of Path
SET Path=%JAVA_HOME%\bin;%M2_HOME%\bin;...
After exiting all my running cmd.exe and opened a new one I was able to do mvn --version with no problems.
I had the same problem, but the cause was M2_HOME variable defined as:
C:\apache-maven-3.2.2\bin
instead of
C:\apache-maven-3.2.2\
Also the JAVA_HOME should be to the java folder, and not to the \bin sub-folder.
I ran into a similar issue and the problem is with the presence of character "(" in the current directory path where maven is being run eg:- C:\Work(test)\Java-Project. I simply changed it to C:\Work\Java-Project and its working fine now.
For info I'm running Windows 10 with Maven V3.6.0
Insert with windows GUI Environment Variable Configurations > System Variables :
Name JAVA_HOME
Path C:\Program Files (x86)\Java\jre7\ << with "\" in the end. no quotes.
kill process cmd.exe and re-open if it was opened.
It worked to me.
I had the same issue. I didn't have quotes around the values for M2_HOME or JAVA_HOME, but still got the error.
I moved %M2_HOME%\bin and %JAVA_HOME%\bin left in the path so that both occurred before any spaces in the path and the problem vanished.
Error Message : was unexpected at this time when I run mvn --version command in cmd.
Please find the procedure:
My Computer -> Right click properties-> Advanced-Environment Variables- User Variable
Maven 3.2.3
User Variable :
Variable name :M2
Variable Value : %M2_HOME%\bin
Variable name : M2_HOME
Variable Value : C:\WLS1033\Apache Software Foundation\apache-maven-3.2.3
Variable name :path
Variable Value : %M2_HOME%\bin
Result :
D:\Documents and Settings\x169810>mvn --version
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-11T16:58:10-04:00)
Maven home: C:\WLS1033\Apache Software Foundation\apache-maven-3.2.3
Java version: 1.6.0_18, vendor: Sun Microsystems Inc.
Java home: C:\WLS1033\jdk160_18\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
My Computer -> Right click properties-> Advanced-Environment Variables- User Variable
Maven 1.0.2
User Variable :
Variable name :M2
Variable Value : %MAVEN_HOME%\bin
Variable name : MAVEN_HOME
Variable Value : C:\WLS1033\Apache Software Foundation\maven-1.0.2
Variable name :path
Variable Value : %MAVEN_HOME%\bin

Java error when starting Eclipse on Win 8

When starting Eclipse I get the following error:
Obviously it's trying to use javaw.exe from system32-folder, which it shouldn't I guess. I've set the environment-vars to the following:
JAVA_HOME : "C:\Program Files\Java\jdk1.7.0_07;C:\Program Files (x86)\Java\jdk1.7.0_07"
Path : "... ;C:\Program Files (x86)\Java\jdk1.7.0_07\bin;C:\Program Files\Java\jdk1.7.0_07\bin"
and I added -vm C:\Program Files\Java\jdk1.7...\bin\javaw.exe to eclipse.ini
Java and JDK are installed. x86-version and x64-version.
Has anybody an idea, how I can solve this?
The solution is the following:
I removed the -vm C:\Program ... entry from eclipse.ini
I removed the JAVA_HOME variable
I edited the Path as follows:
I moved the path to javaw.exe to the beginning of the Path-variable, because it's using the first javaw.exe it finds and there's one in system32-folder whyever.

Running Jetty 7 as Windows Service

Did Jetty 7 drop support to run as a service using Java Service Wrapper?
What options do I have now?
#glb, thanks for pointing out apache commons-daemon Procrun.
Its working great for me on Windows 7 64 Bit, here's how I set it up.
For more info see
procrun page as per link from #glb
jetty help screen > java -jar start.jar --help
REM 1. Open command prompt as Administrator
mkdir C:\java\apache-commons-daemon
REM 2. Download commons-daemon binaries for windows to directory above from
REM http://www.apache.org/dist/commons/daemon/binaries/windows/commons-daemon-1.0.15-bin-windows.zip
REM 3. unzip which will create C:\java\apache-commons-daemon\commons-daemon-1.0.5-bin-windows
mkdir C:\java\jetty
REM 4. Download jetty to directory above from
REM http://download.eclipse.org/jetty/7.4.2.v20110526/dist/jetty-distribution-7.4.2.v20110526.zip
REM 5. install / unzip which will create C:\java\jetty\jetty-distribution-7.4.2.v20110526
REM 6. Verify that jetty can be started
cd C:\java\jetty\jetty-distribution-7.4.2.v20110526
java -jar start.jar
REM Look for any obvious errors on the console
REM Open a browser at http://localhost:8080/
REM You should be presented with the Jetty Start Page,
REM and be able to execute the Hello World Servlet
REM OK, that's enough,
REM come back to the command prompt and ctrl-C to stop the jetty server
REM 7. Copy and rename commons-daemon binaries into the JETTY_HOME directory structure
REM Note that the GUI manager is copied to JETTY_HOME,
REM and the service exe is copied to JETTY_HOME\bin
REM Note that both binaries get the same target name,
REM but are placed in different directories
REM This is just makes it easier to launch the GUI manager
REM by not having to provide command line arguments
REM Note that I have selected the amd64\prunsrv.exe as the service exe,
REM I am running on Windows 7 64 bit Intel i7 Xeon
cd C:\java\jetty\jetty-distribution-7.4.2.v20110526
copy \java\apache-commons-daemon\commons-daemon-1.0.5-bin-windows\prunmgr.exe .\JettyService.exe
copy \java\apache-commons-daemon\commons-daemon-1.0.5-bin-windows\amd64\prunsrv.exe .\bin\JettyService.exe
REM 8. Time to install the service
bin\JettyService //IS//JettyService --DisplayName="Jetty Service" --Install=C:\java\jetty\jetty-distribution-7.4.2.v20110526\bin\JettyService.exe --LogPath=C:\java\jetty\jetty-distribution-7.4.2.v20110526\logs --LogLevel=Debug --StdOutput=auto --StdError=auto --StartMode=Java --StopMode=Java --Jvm=auto ++JvmOptions=-Djetty.home=C:\java\jetty\jetty-distribution-7.4.2.v20110526 ++JvmOptions=-DSTOP.PORT=8087 ++JvmOptions=-DSTOP.KEY=downB0y ++JvmOptions=-Djetty.logs=C:\java\jetty\jetty-distribution-7.4.2.v20110526\logs ++JvmOptions=-Dorg.eclipse.jetty.util.log.SOURCE=true ++JvmOptions=-XX:MaxPermSize=128M ++JvmOptions=-XX:+CMSClassUnloadingEnabled ++JvmOptions=-XX:+CMSPermGenSweepingEnabled --Classpath=C:\java\jetty\jetty-distribution-7.4.2.v20110526\start.jar --StartClass=org.eclipse.jetty.start.Main ++StartParams=OPTIONS=All ++StartParams=C:\java\jetty\jetty-distribution-7.4.2.v20110526\etc\jetty.xml ++StartParams=C:\java\jetty\jetty-distribution-7.4.2.v20110526\etc\jetty-deploy.xml ++StartParams=C:\java\jetty\jetty-distribution-7.4.2.v20110526\etc\jetty-webapps.xml ++StartParams=C:\java\jetty\jetty-distribution-7.4.2.v20110526\etc\jetty-contexts.xml ++StartParams=C:\java\jetty\jetty-distribution-7.4.2.v20110526\etc\jetty-testrealm.xml --StopClass=org.eclipse.jetty.start.Main ++StopParams=--stop
REM 9. Test that the service starts at the command prompt
bin\JettyService //TS
REM 10. To delete the service uncomment the line below
REM bin\JettyService //DS
REM 11. Now launch the GUI manager to check the parameter settings
JettyService.exe
REM You can use the GUI to start and stop the service, and to change the settings
REM If you want the GUI exe to have a different name to the service exe,
REM then close the GUI and uncomment and run the line below
REM ren JettyService.exe JettyServiceMgr.exe
REM To launch the renamed GUI uncomment and run the line below
REM JettyServiceMgr.exe //ES//JettyService
done!
Take a look at Procrun from the Apache Commons. You'll want to browse the native binaries download area to get the Windows binaries.
In the latest stable version of Java Service Wrapper (JSW 3.4.1) there's WrapperJarApp method of integration:
This is part of my configuration:
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperJarApp
wrapper.java.classpath.1=%WRAPPER_HOME%/lib/*.jar
wrapper.java.classpath.2=%JETTY_HOME%/lib/*.jar
wrapper.java.classpath.3=%JETTY_HOME%/start.jar
wrapper.java.library.path.1=%WRAPPER_HOME%/lib
wrapper.app.parameter.1=%JETTY_HOME%/start.jar
wrapper.app.parameter.2=%JETTY_HOME%/etc/jetty.xml
# other config params as needed
You can get the src from: http://svn.codehaus.org/jetty/jetty/branches/jetty-7/jetty-win32/ and build it yourself.
But I manually installed the wrapper as any “standard” wrapper installation.
Took the original Jetty-Service.conf file and changed:
wrapper.java.mainclass=org.mortbay.jetty.win32service.JettyServiceWrapperListener
to
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
And added…
wrapper.app.parameter.1=org.eclipse.jetty.start.Main <-- Main class
wrapper.app.parameter.2=../etc/jetty.xml
wrapper.app.parameter.x=../etc/jetty-x.xml <--Any additional config files you wish to include…
wrapper.app.parameter.y=../etc/jetty-y.xml
Seems to start fine and it seems to shutdown gracefully too.
I had a problema running #crowne's code for install the service (I'm running Jetty 8.1.0). Just needed to change -StartMode=Java --StopMode=Java to -StartMode=jvm --StopMode=jvm and remove ++JvmOptions=-XX:+CMSPermGenSweepingEnabled.
After that I created a create_jetty_service.bat at the jetty/bin folder and run the file from there:
set jetty_home = C:\java\jetty\jetty-hightide-8.1.0.v20120127
JettyService //IS//JettyService --DisplayName="Jetty Service" ^
--Install=%jetty_home%\bin\JettyService.exe ^
--LogPath=%jetty_home%\logs ^
--LogLevel=Debug --StdOutput=auto --StdError=auto --StartMode=jvm --StopMode=jvm --Jvm=auto ^
++JvmOptions=-Djetty.home=%jetty_home% ^
++JvmOptions=-DSTOP.PORT=8087 ^
++JvmOptions=-DSTOP.KEY=downB0y ^
++JvmOptions=-Djetty.logs=%jetty_home%\logs ^
++JvmOptions=-Dorg.eclipse.jetty.util.log.SOURCE=true ^
++JvmOptions=-XX:MaxPermSize=256M ^
++JvmOptions=-XX:+CMSClassUnloadingEnabled ^
--Classpath=%jetty_home%\start.jar ^
--StartClass=org.eclipse.jetty.start.Main ^
++StartParams=OPTIONS=All ^
++StartParams=%jetty_home%\etc\jetty.xml ^
++StartParams=%jetty_home%\etc\jetty-deploy.xml ^
++StartParams=%jetty_home%\etc\jetty-webapps.xml ^
++StartParams=%jetty_home%\etc\jetty-contexts.xml ^
++StartParams=%jetty_home%\etc\jetty-testrealm.xml ^
--StopClass=org.eclipse.jetty.start.Main ++StopParams=--stop
Remember to run cmd.exe as administrator to the command take effect.
You can run as a Windows service Jetty can be used to exewrap.
Jetty Windows Service all-in-one packages are also distributed.
http://exewrap.sourceforge.jp/jetty/
If you are in a bit of a locked down environment and need to stay within the Microsoft provided tool set, then srvany, instsrv and sc are your friends. Unfortunately it often includes making registry edits. The nice thing is it's very flexible.
Here's what I did recently to auto-start a Selenium Grid hub server.
Copy srvany.exe into c:\tools\srvany\srvany.exe
Open cmd window as admin and run:
$ cd C:\tools\srvany
$ sc create "Selenium Grid Hub Server" binPath= c:\tools\srvany\srvany.exe DisplayName= "Selenium Grid Hub Server"
RegEdit
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Selenium Grid Hub Server
Add a new key named Parameters
Under that key, add 3 new String Values named:
Application => ${JAVA_HOME}/bin/java.exe
AppParameters => -jar selenium-server-standalone-2.42.2.jar -role hub
AppDirectory => C:\tools\selenium
Credit for this goes to http://codeforjava.blogspot.com/2010/12/run-java-application-as-windows-nt.html

Resources