13

Whenever I am starting my WebLogic server I am getting this error msg in my eclipse console:

\Java\jdk1.6.0_03\bin was unexpected at this time.

My m/c is a 64bit one.

catch23
  • 17,519
  • 42
  • 144
  • 217
Shantanu
  • 201
  • 2
  • 6
  • 15

5 Answers5

30

In case if someone encountered this question now, like I just did, If you are using 32 bit Java on a 64 bit machine, you can use following way to set JAVA_HOME to get rid of space issue in class path. No need to provide quotes.

C:\progra~2\Java\jdk1.7.0_67

progra~2 refers to Program Files(x86).

Milan Pandey
  • 1,010
  • 10
  • 22
  • Awesome!! this should be accepted as the right answer! – Vicky Kapadia Sep 01 '16 at 21:03
  • Randomly got the error across some batch files with your exact scenario. I have quoted path but for some reason the batches didn't like it. Works like charm with that method. – mihail Feb 13 '18 at 15:51
8

Check your path variables. The most common cause of it is forgetting quotes.

Your %JAVA_HOME% could be set to path like this:

C:\program files(x86)\Java\jdk1.6.0_03

and spaces in such a path are not resolved until put into double quotes:

"C:\program files(x86)\Java\jdk1.6.0_03"

catch23
  • 17,519
  • 42
  • 144
  • 217
Tala
  • 8,888
  • 5
  • 34
  • 38
1

Shantanu,

You are getting this problem because you have a misconfigured value in your path environment variable.

Go to Computer->Properties->Advanced System Settings select Environment Variables 1) Make sure that the value for "path" in user variables is correct. 2) Make sure that the value for "path" in System variables is correct. 3) Check to see if there's a classpath Variable defined in user/system variables and make sure its correct too.

I remember when installing MKS toolkit I think, it appended the path variable with its own JDK location. I removed it all together and got rid of this error.

SridharS
  • 893
  • 4
  • 8
  • Thanks very much for the reply Sridhar.Could you please explain what should my path variable be set to? – Shantanu Jun 29 '13 at 15:02
  • You can either not have any path variable in your windows environment configuration, or set it to something that's real and exists in your system. In my case the path was pointing to a non existing directory. I removed it all together and that resolved the issue. – SridharS Jul 02 '13 at 13:18
1

Please check your Java version, this error we can see because of 32 or 64 bit java version.

Example :

You have downloaded software version working on Java 32 but you have already installed Java 64.

vaquar khan
  • 10,864
  • 5
  • 72
  • 96
0

There may be \Java\jdk1.6.0_03\ installed on your machine and conflicting with JDK of WLServer. Uninstall and run the server will resolve the issue.