Jdeveloper - Unrecognized option: -jrockit
Asked Answered
A

4

7

Every time I try to run a weblogic webcenter application on Jdev I get the following error and I cant find any reference on how to fix this anywhere on the web.

starting weblogic with Java version: Could not create the Java virtual machine. Unrecognized option: -jrockit

Arpeggio answered 21/5, 2012 at 3:12 Comment(2)
whats the startup java command shown in the log? the one which shows weblogic trying to start?Undershot
I dont have access to it any more, but I do recall is was a long java -jrokit command. I did however find a small temporary solution and that was replacing the JDK with Jrocket on my system, dont know what I did there but it was worth a try and it now seems to work.Arpeggio
W
8

Try modifying the startWebLogic.cmd file (WIN7)

c:\users\{user}\AppData\Roaming\JDeveloper\system{version}\DefaultDomain\bin\startWebLogic.cmd 

to contain

set JAVA_VM=-server
set MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m
Watercraft answered 22/8, 2012 at 11:4 Comment(0)
L
4

Jdeveloper 11g do not support jdk 1.7

https://forums.oracle.com/thread/2482850

I fixed it by add to top of c:\users{user}\AppData\Roaming\JDeveloper\system{version}\DefaultDomain\bin\setDomainEnv.cmd:

set SUN_JAVA_HOME=E:\Oracle\Java\jdk1.6.0_37
set JAVA_VENDOR=Sun
Leadsman answered 17/7, 2013 at 9:46 Comment(0)
S
1

In OSX, look for the this folder /Users/{USERNAME}/.jdeveloper/system{VERSION}/DefaultDomain/bin

Edit the file setDomainEnv.sh and look for SUN_JAVA_HOME and make sure the value is the same value as your JAVA_HOME, i.e. /Library/Java/JavaVirtualMachines/jdk${JDK_VERSION}.jdk/Contents/Home, by default it seems it is set to an empty string "".

Edit the file startWebLogic.sh and add the following before setDomainEnv.sh is called.

JAVA_VENDOR=Sun

You can test it out by running sh ./startWebLogic.sh, if it runs with -jrockit error, then all is good :)

I've also tested with Java JDK 1.7 and it seems to work.

Sabian answered 5/4, 2015 at 3:25 Comment(0)
E
1

The reason is, that older Weblogic Versions use the Java VM "JRockit" http://www.oracle.com/technetwork/middleware/jrockit/overview/index.html

The JRockit VM is no longer supported in Java 7 or higher.

All of the other solutions here seem to be hacks and none of them helped me. I had the same Problem with a Weblogic 10.3.5 and I found out, the installation was incorrect.

The Problem is, that there is no java version check in the installer, so if you don't know that you can't use Java 7 or higher you are screwed.

These steps fixed it for me:

  • You need to make sure you have Java 6 or lower installed.
  • Reinstall the Weblogic and make sure to specify the correct JDK
Erelong answered 14/7, 2015 at 10:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.