0

I am using macOS Big Sur and OMNeT++ 5.6.2. I followed the instructions from the manual for the installation.

However, when typing omnetpp to start the IDE, I see the OMNeT++ icon showing up for only a split of a second. The error.log file says:

omnetpp[62922:141543] CheckForInstalledJavaRuntimes: Please visit http://www.java.com for information on installing java.

Nevertheless, my java-version is:

% java -version
java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 1.8.0_281-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.281-b09, mixed mode)

I guess everything is fine so far, but I have no further idea to solve the error mentioned above and I am glad about hints. Thank you.

54654654
  • 13
  • 2

2 Answers2

0

This is an issue that comes from Eclipse and not directly from OMNeT++.

You first should make sure that you have Java installed (according to the issue mentioned in your error.log file). You could do that by:

brew install --cask adoptopenjdk8

After you finished that, you may solve the issue by adding

<string>-vm</string><string>Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java</string>

to the ide/omnetpp.app/Contents/Info.plist file within your OMNeT++ 5.6.2 folder. The string should be added to the array element at the bottom of that file

thardes2
  • 1,162
  • 12
  • 28
0

I had the same problem, but required an additional step. Here's the complete procedure.

Step 1: Install adoptopenjdk8

brew install --cask homebrew/cask-versions/adoptopenjdk8

Step 2: In file ide/omnetpp.app/Contents/Info.plist, insert the following between array tags

<array>
  ...
  <string>-vm</string>
  <string>/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/bin/java</string>
</array>

Step 3: Create a symbolic link to the JVM library

sudo ln -s /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre/lib/server/libjvm.dylib /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/lib/libserver.dylib
Asanga Udugama
  • 111
  • 1
  • 6