Typesafe activator: Java JDK can't be found - typesafe

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

Related

can't run integrated WebLogic 12.2.1.4 server on Windows 10

I have windows 10 machine, and JDeveloper 12.2.1.4.0 , when i try to run the weblogic server for the first time i get this error :
Adding environment variable to WLST script USER_MEM_ARGS = -Xms32m -Xmx1024m -XX:MaxPermSize=384m
Log File: C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain.log
Label: JDEVADF_PT.12.2.1.4.0_GENERIC_190911.2248.S
Product Home: D:\Oracle\Middleware\BPM_12.4\jdeveloper\jdev\
Domain: C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\DefaultDomain
BuildDefaultDomain1.py 2020-06-05 09:14:45
cmd.exe /c ""D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py""
Cannot run program "cmd.exe" (in directory "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin"): Malformed argument has embedded quote: "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py"
java.io.IOException: Cannot run program "cmd.exe" (in directory "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin"): Malformed argument has embedded quote: "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py"
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at oracle.jdevimpl.adrs.weblogic.wlst.ScriptRunnerImpl.runScript(ScriptRunnerImpl.java:106)
at oracle.jdevimpl.adrs.weblogic.builder.DomainScriptRunnerImpl.runScript(DomainScriptRunnerImpl.java:146)
at oracle.jdevimpl.adrs.weblogic.builder.DefaultDomainBuilder.createDomain(DefaultDomainBuilder.java:606)
at oracle.jdevimpl.adrs.weblogic.builder.DefaultDomainBuilder.build(DefaultDomainBuilder.java:274)
at oracle.jdevimpl.adrs.weblogic.builder.DefaultDomainBuilder$1.run(DefaultDomainBuilder.java:225)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Caused by: java.lang.IllegalArgumentException: Malformed argument has embedded quote: "D:\Oracle\Middleware\BPM_12.4\oracle_common\common\bin\wlst.cmd" "C:\Users\OSMOHAME\AppData\Roaming\JDeveloper\system12.2.1.4.42.190911.2248\o.j2ee.adrs\BuildDefaultDomain1.py"
at java.lang.ProcessImpl.needsEscaping(ProcessImpl.java:279)
at java.lang.ProcessImpl.createCommandLine(ProcessImpl.java:202)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:436)
at java.lang.ProcessImpl.start(ProcessImpl.java:140)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 9 more
i did some research and most people tell that the solution in the following url is fixing the problem
http://unversioned.blogspot.com/2015/12/jdeveloper-12c-generic-installer-cannot-create-weblogic-domain.html
but the problem is when i open the javashell.py file , i don't find an entry for
_osTypeMap =
it Doesn't Exist in the file
Also , another solution the people said it worked is by adding this line
Djdk.lang.Process.allowAmbiguousCommands=true
but they didn't said where to add it and what is the exact steps !
There is a known issue with JDeveloper, WLS 12.2.1.4 and JDK 8 opened at My Oracle Support : Bug 30670839 : INTEGRATED WLS CANNOT BE CREATED WHEN USING JDK1.8.0_231
There is no patch available for now but you can try the workaround provided in the bug note : Revert back to JDK shipped with JDeveloper
If we see, problem is with the type of command that JDeveloper executes to start the weblogic instance is old and therefore does not work correctly, however below solution is working. It did solve the issue in my machine
We must modify this file:
C:<JDEVELOPER Install Path>\ide\bin\ide.conf
Add the following line:
AddVMOption -Djdk.lang.Process.allowAmbiguousCommands = true
Post modification, save the file.
Restart the Jdeveloper, compile and launch the weblogic server.

Verpatch.exe error

I am trying to add new version resource string to .exe file using verpatch.
I need to add new sting to version resource as I am creating test connector to Qlikview. For QlikView and Qlik Sense to be able to recognize an .exe file as a connector, the file version information resource must include the property “QlikView Connector”.
I am developing my connector with Visual Studio and this command is run as a post build command and build ends with error. I also tried to run it from command line with same result:
C:\verpatch>verpatch.exe C:\QV_temp\QVTestConnector.exe /s "QlikView Connector" "Qv Test Connector"
Exception in ParseBinaryVersionResource
Error in ParseBinaryVersionResource
error parsing version info from the file
Some of actions failed, exiting
I have also tried different versions on verpatch.exe. Any ideas?
The example that Qlik gives on their documentation does not seem to work with the version of verpatch.exe that ships with QVX SDK 2.1.
I resolved this error by updating to a newer version from CodePlex.
Edit:
verpatch seems to have moved to https://github.com/pavel-a/ddverpatch/releases
Please see documentation. After /s should go "description".
If it has problem reading existing version resource, try to rewrite it completely with /va. So, do something like:
verpatch your.exe 1.0.0.0 /va /s desc "QlikView Connector" /s product "Qv Test Connector"
If you can share the problematic exe with the author of verpatch (on Codeplex), he may provide a fix.
I couldn't set properties on my executable with any version of verpatch - because I had a different codepage in the resource strings.
I would recommend rather using the Python package pe-tools (PyPI), which has a nicely documented command peresed that does this (docs).
You can also set specific version-info fields or set resource entries to the contents of a file:
peresed filename.exe -V "QlikView Connector=Qv Test Connector"
I have run this command successfully, but not verified whether the properties were set - but other properties like FileDescription are set correctly.

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.

san-angeles project

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

Resources