Java error when starting Eclipse on Win 8 - windows

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.

Related

Can't add Embree to my project, getting LNK1104 error

I'm trying to add Embree to an already working solution, following this resource I've added to my CMakeLists.txt file the following:
FIND_PACKAGE(embree 3.0 REQUIRED)
INCLUDE_DIRECTORIES(${EMBREE_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(application ${EMBREE_LIBRARY})
I've also created a Windows environment variable embree_DIR with my Embree installation folder ("C:\Program Files\Intel\Embree3 x64").
CMake configures the solution fine, but when I build I get a fatal error LNK1104: impossible to open 'embree3.lib'.
Just so you know, I actually have a C:\Program Files\Intel\Embree3 x64\lib\embree3.lib file.
Anyone has any clue why this might be happening?
Set EMBREE_ROOT_DIR e.g.:
set(EMBREE_ROOT_DIR "C:/thirdparty/vs2017/x64/embree-2.17.0")
Link to ${EMBREE_LIBRARIES}
target_link_libraries(YourApp
...
${EMBREE_LIBRARIES}
...
)

Windows Driver build - incorrect path passed to Inf2Cat.exe

I'm new to the subject of windows drivers. I'm trying to build one of the Windows-driver-samples in Visual Studio 2015. The compilation and linking steps pass without errors and then I get the following error:
TRACKER : error TRK0002: Failed to execute command:
""C:\Program Files (x86)\Windows Kits\10\bin\x86\inf2cat.exe"
/os:10_x64 /driver:x64\Debug\WFPSamplerCalloutDriver\".
The operation identifier is not valid.
(Note the relative path in /driver argument). If I call Inf2Cat manually from command prompt with full path to the driver, it passes without a hitch:
C:\Program Files (x86)\Windows Kits\10\bin\x86>Inf2Cat.exe /os:10_x64
/driver:C:\Users\****\Windows-driver-samples\network\trans\WFPSampler\sys\x64\Debug\W
FPSamplerCalloutDriver
...........................
Signability test complete.
Errors:
None
Warnings:
None
Catalog generation complete.
C:\Users\****\Windows-driver-samples\network\trans\WFPSampler\sys\x64\Debug
\WFPSamplerCalloutDriver\wfpsamplercalloutdriver.cat
So, it seems to me that VS somehow failed to provide the full path to the driver in the argument to Inf2Cat.
How can I fix this? Which configuration property of my project is incorrect?
Description
Seems Inf2Cat from SDK10 does not accept directory path format provided by VS Project Configurator. Works when: either output folder name has with no trailing "\" or folder name ends up with "\.".
Workaroud
Disable Inf2Cat under Project Preferences: Run Inf2Cat -> No
Configure build events under Build-Events->Post Build-Event: Command Line -> "$(WindowsSdkDir)bin\$(DDKPlatform)\inf2cat.exe" /os:10_$(DDKPlatform) /driver:"$(ProjectDir)$(IntDir)$(MSBuildProjectName)"

error while restarting integrated weblogic server on jdev

I am getting the below error on trying to restart the IWLS on JDEV
C:\Users\c-sutipirn\system11.1.2.2.39.61.83.1\DefaultDomain\bin\startWebLogic.cmd
[waiting for the server to complete its initialization...]
\Java\jdk1.7.0_25 was unexpected at this time. Process exited.
my path variable is set to:
C:\Oracle\product\11.2.0\client_2\bin;C:\Program Files (x86)\Windows
Kits\8.0\Windows Performance
Toolkit\;C:\app\client\product\12.1.0\client_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program
Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft
SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft\Web Platform
Installer\;C:\Program Files\Microsoft SQL
Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL
Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL
Server\110\Tools\Binn\ManagementStudio\;C:\Program Files
(x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files
(x86)\Subversion\bin;C:\Program Files
(x86)\Java\jre7\bin;C:\Oracle\Middleware\jdk160_24
Any help to resolve this issue.
11.1.2.2 needs JDK 6 to work.
Upgrade to either 12c or at least 11.1.2.4 and you will be able to run with JDK7.
Problem is that WebLogic server starting scripts (as startWebLogic.cmd and setDomainEnv.cmd ) refers system variables as %JAVA_HOME% (or %CLASSPATH%) without quotation e.g. "%JAVA_HOME%".
"%1 was unexpected at this time"
is shell error result caused by spaces in used system variables.
I'm solving similar problem with WebLogic 12.1.x server and I do not know simple solution, start script is pretty complex and hard to fix.
It seems that this can be related to the value of the PATH environment variable.
If it contains a path (with quotes) like ;"C:\Program Files (x86)\Java\jre7\bin"; (with a space) it will result in "Files was unexpected at this time".
Removing the quotes seems to resolve this (;C:\Program Files (x86)\Java\jre7\bin;) and using the short name could be an alternative (;C:\PROGRA~2\Java\jre7\bin;, try "dir /X" to get the short name).
Ran into similar issue. Turned out %PATH% was too long and blew up in c:\Oracle\Middleware\Oracle_Home\oracle_common\common\bin\shortenPaths.cmd
In my case, I just commented out with REM as follows:
REM if NOT "%PATH%"=="" (
call :handle_path
REM )
goto :EOF
PS: didn't see the EOF label so i also added :EOF at the end of the file
I solved it through path variables changes for windows, by following this steps:
define JAVA_HOME and MVN_HOME first as new env viriables
Update Path and add new viariables: %JAVA_HOME%\bin and %MVN_HOME%\bin
Make sure you do not have nay other variables with a full path name like: C:\Program Files.
I had this trouble.
If you wanna create new Oracle domain on weblogic, you should make comments on line with loop (for) in Oracle\Middleware\Oracle_Home\oracle_common\common\bin\config.cmd. After that call config.cmd through cmd.

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

Resources