Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jdeveloper - Unrecognized option: -jrockit

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

like image 515
I AM L Avatar asked May 21 '12 03:05

I AM L


3 Answers

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
like image 55
avanderw Avatar answered Nov 13 '22 00:11

avanderw


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
like image 39
Thang Hoang Avatar answered Nov 13 '22 00:11

Thang Hoang


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.

like image 34
cheeming Avatar answered Nov 13 '22 00:11

cheeming