[Guide] Running VP on FreeBSD!

Hi gang!

Warning: this guide is highly technical and meant for users who are well familiar with FreeBSD’s ports collection, regular command line usage, and editing of (Visual Paradigm) system files. Although this is a guide it only targets the specific problems you’ll encounter when trying this. Therefor basic steps such as downloading Visual Paradigm and installing it are not explained.


FreeBSD is an open source Unix-like operating system which is somewhat comparable to Linux. Of course you can’t really compare the two; it’s like saying that Windows is somewhat comparable to macOS because both use a graphical user interface as their main environment. For example; unlike Linux FreeBSD actually has direct ties into a real Unix environment called BSD Unix, and this is also showing in the way the OS is set up and developed.

BUT… Back to Visual Paradigm! :slight_smile:

Dell + FreeBSD => KDE + Visual Paradigm :hugs:
…but it needs some serious tweaking!

I recently got hold of a Dell PowerEdge tower model and figured I’d run FreeBSD on it. Normally none of my servers use the graphical X / Xorg environment because the commandline is all I usually need, but because this is a 64bit environment with plenty of memory I figured why not. So I also installed X, KDE4 and some other utilities such as NetBeans. And that just cried out for Visual Paradigm :sunglasses:

Visual Paradigm is available for several platforms: Windows, MacOS, Linux and Unix. And the latter is a little bit of a free for all because VP depends on several features which need to be present. And that’s not always the case…

Some of the problems you’re going to encounter

OpenJDK8 does not provide JavaFX

As you may know Visual Paradigm is developed in Java, which is the main reason why I can even do this. FreeBSD’s ports collection provides a free Java environment called OpenJDK, it is available as java/openjdk8. Unfortunately it does not include JavaFX which is being used by VP. Although this won’t prevent VP from running you are going to get tons of error messages in your logfile.

There is a free JavaFX clone available called java/openjxf8-devel but I haven’t experimented with this yet. Which is mainly because I had quite some issues with trying to solve the next item:

No native SQLite support

VP heavily relies on SQL for its projects, and this is provided by the SQLite library. This library is available on FreeBSD and its called databases/sqlite3. The Java driver is called java/sqlitejdbc.

Unfortunately it turned out that merely providing these libraries wasn’t enough to get VP to work:

As you can see it specifically complained about not being able to use SQLite which made the application crash / stall. Not surprising if you consider that all of VP’s data files (our projects) are also saved in an sqlite format. So not having SQLite support is a big problem here…

How to solve this? Well…

Option 1: Replace VP’s sqlite library with the FreeBSD native version

If you check the VP program folder you’ll notice that it provides several libraries of its own:

omicron:/usr/local/Visual_Paradigm_14.2/lib $ ls
ant.jar                         lib09.jar
derby.jar                       openapi.jar
jniwrap.jar                     platforminstaller.jar
lib01.jar                       platforminstaller_backup1.jar
lib02.jar                       startsde.jar
lib03.jar                       vpplatform.jar
lib04.jar                       vpserver.jar
lib05.jar                       vpserverres.jar
lib05.jar_bck                   winpack.jar
lib06.jar                       xalan.jar

Closer inspection learned me that lib05.jar is actually the file which provides sqlite. Unfortunately FreeBSD support is not included which is exactly why I got those error messages (note; I cropped the output):

$ unzip -l lib05.jar_bck | grep native
        0  08-06-14 23:28   org/sqlite/native/
        0  08-06-14 23:28   org/sqlite/native/Linux/
        0  08-06-14 23:28   org/sqlite/native/Linux/amd64/
        0  08-06-14 23:28   org/sqlite/native/Linux/i386/
        0  08-06-14 23:28   org/sqlite/native/Mac/
        0  08-06-14 23:28   org/sqlite/native/Mac/i386/
        0  08-06-14 23:28   org/sqlite/native/Mac/x86_64/
        0  08-06-14 23:28   org/sqlite/native/Windows/
        0  08-06-14 23:28   org/sqlite/native/Windows/amd64/
        0  08-06-14 23:28   org/sqlite/native/Windows/x86/

As you can see: no native/FreeBSD/amd64, which is what I needed.

So one easy messy way to solve this is to simply replace lib05.jar with the native FreeBSD library. If you installed java/sqlitejdbc then you can find this file in /usr/local/share/java/classes/sqlitejdbc-native.jar. Just rename lib05.jar into something else and then copy this file and rename it to lib05.jar:

$ mv lib05.jar lib05.jar_bck && cp /usr/local/share/java/classes/sqlitejdbc-native.jar lib05.jar

This should be enough to get Visual Paradigm to work “somewhat” but with a heap of error messages (this is a work in progress!).

Build your own driver

The sqlite-jdbc which is provided in the FreeBSD ports collection is called sqlitejdbc and was developed by David Crawshaw of Zentus. However, the driver used by VP is called sqlite-jdbc and its licensed under the Apache 2.0 open source license. Which means that we can roll our own…

Fun fact: the library used by Visual Paradigm is maintained by Xerial and actually a fork of the Zentus library. This is why my previous replacement easily works. However, this library provides a lot more functionality, therefor it’s a better idea to build a native version for FreeBSD.

The project is hosted on GitHub so its easy to obtain the source code:

$ git clone GitHub - xerial/sqlite-jdbc: SQLite JDBC Driver

This is a GNU based project, so you need to have gmake available. If it isn’t then grab it from the ports collection: devel/gmake.

You’re also going to need several libraries in order to compile this, when in doubt just use Maven to sort out all the dependencies and build the project.

At the time of writing I finished building the library, but instead of trying I’m writing this post first :wink:

And the result so far?

So far, so good. As you can see in the background it still triggers some error messages, mostly related to JavaFX and some missing sqlite functionality, but I’ll explain more about that in the next part, coming later this week.

This is a good example why open source and in this case more so open standards are such a big deal. It provides us, the users, with enough control to make things work even if the environment isn’t officially supported yet.

1 Like

It works!

If you look closely to the command line window (the green text) then you’ll notice that there are no error messages shown after “Workspace: /home/peter/VisualParadigm/ws”, which is exactly what I was trying to achieve.

So as you can see you can get Visual Paradigm to work on FreeBSD but it requires tweaking.

How to make it work (fully tested / worked out instructions).

  • Install java/openjdk8 and java/freejfx8-devel.
  • Grab a copy of the SQLite JDBC driver source, and compile it.

It needs some specific steps:

  • Set JAVA_HOME: export JAVA_HOME=/usr/local/openjdk8
  • Make sure you have gmake installed (devel/gmake) and use that for building, so just issue gmake.

The build process will probably end with an error about Docker missing. Don’t mind that because it has already done what we needed. So now to build the jarfile:

$ cd target
$ jar cvf lib05.jar -C common-lib org
$ jar uvf lib05.jar -C classes org

And finally: replace this file (lib05.jar) with the existing one in your Visual Paradigm installation directory. So I’d issue:

$ cp lib05.jar /usr/local/Visual_Paradigm/lib

Warning: this will overwrite your existing library. But that shouldn’t matter too much because in its current state Visual Paradigm won’t run anyway :wink:

I’m super excited about this discovery because it brings me back to 2006 or so. Fun fact: I discovered Visual Paradigm while I was using Linux (and KDE) as my main desktop. I ran NetBeans on Linux and got myself the sde-nb license so that I could use it within NetBeans.

… which is what I’ll be setting up next, but that’s a diferent story :slight_smile:


I can verify that these instructions still work for Version CE 16.0.

1 Like

I’m trying to do the same, but with no success %(

JVM has crashed.

Installer file is:

It would be nice if you could help me with this stuff.
Any ideas?!

% uname -a
FreeBSD grbg 12.1-RELEASE-p3 FreeBSD 12.1-RELEASE-p3 r359640 KSSU12 amd64

Error file contents are:

MODULES=“java.base java.compiler java.datatransfer java.xml java.prefs java.desktop java.instrument java.logging java.management java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.transaction.xa java.sql java.sql.rowset java.xml.crypto java.se javafx.base jdk.unsupported javafx.graphics javafx.controls javafx.media jdk.unsupported.desktop javafx.swing jdk.jsobject jdk.xml.dom javafx.web jdk.internal.jvmstat jdk.attach jdk.compiler jdk.crypto.ec jdk.javadoc jdk.jdwp.agent jdk.jdi”
root@grbg:/usr/home/hishnik/Downloads/Visual_Paradigm_CE_16_1_20200609_Linux64.sh.91646.dir # cat hs_err_pid91678.log

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0xffffffffff600800, pid=91678, tid=101507

JRE version: (11.0.7+10) (build )

Java VM: OpenJDK 64-Bit Server VM (11.0.7+10, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)

Problematic frame:

C 0xffffffffff600800

Core dump will be written. Default location: core.91678 (may not exist)

If you would like to submit a bug report, please visit:


--------------- S U M M A R Y ------------

Command Line: -Dexe4j.moduleName=/home/hishnik/Downloads/Visual_Paradigm_CE_16_1_20200609_Linux64.sh -Dexe4j.totalDataLength=700217026 -Dinstall4j.cwd=/home/hishnik/Downloads -Dsun.java2d.noddraw=true install4j.Installer647934017

Host: Intel® Core™ i7-3970X CPU @ 3.50GHz, 12 cores, 31G, CentOS Linux release 7.8.2003 (Core)
Time: Fri Jul 3 18:44:47 2020 MSK elapsed time: 0 seconds (0d 0h 0m 0s)

--------------- T H R E A D ---------------

Current thread is native thread

Stack: [0x0000000801257000,0x0000000801358000], sp=0x0000000801356af8, free space=1022k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0xffffffffff600800
V [libjvm.so+0xc18470] os::init_2()+0x1e0
V [libjvm.so+0xdccb69] Threads::create_vm(JavaVMInitArgs*, bool*)+0x169
V [libjvm.so+0x9163b2] JNI_CreateJavaVM+0x52
C [libjli.so+0x4a16] JavaMain+0x86

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0xffffffffff600800

RAX=0xffffffffff600800, RBX=0x0000000801356b40, RCX=0xffffffffffffff70, RDX=0x0000000000000000
RSP=0x0000000801356af8, RBP=0x0000000801356b10, RSI=0x0000000000000000, RDI=0x0000000801356b0c
R8 =0x0000000000000000, R9 =0x0000000801252f08, R10=0x00000008013565a0, R11=0x00000008013566a0
R12=0x0000000808008f80, R13=0x000000000000000a, R14=0x0000000000000000, R15=0x0000000000000000
RIP=0xffffffffff600800, EFLAGS=0x0000000000010206, CSGSFS=0x0000000000000043, ERR=0x0000000000000014

Top of Stack: (sp=0x0000000801356af8)
0x0000000801356af8: 000000080360cdb0 0000000801356b40
0x0000000801356b08: 00000000026ef1ad 0000000801356c10
0x0000000801356b18: 0000000803618470 000000000f000000
0x0000000801356b28: 00000008039166c8 0000000801356b60

Instructions: (pc=0xffffffffff600800)
[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xb, SIGSEGV (0xb) at pc=0x000000080360633a]

--------------- P R O C E S S ---------------

VM state:not at safepoint (not fully initialized)

VM Mutex/Monitor currently owned by a thread: None

[error occurred during error reporting (printing compressed oops mode), id 0xb, SIGSEGV (0xb) at pc=0x00000008037f3a43]

Dynamic libraries:
Can not get library information for pid = 101507

VM Arguments:
jvm_args: -Dexe4j.moduleName=/home/hishnik/Downloads/Visual_Paradigm_CE_16_1_20200609_Linux64.sh -Dexe4j.totalDataLength=700217026 -Dinstall4j.cwd=/home/hishnik/Downloads -Dsun.java2d.noddraw=true
java_command: install4j.Installer647934017
java_class_path (initial): i4jruntime.jar:launcher0.jar
Launcher Type: SUN_STANDARD

[Global flags]
uint G1ConcRefinementThreads = 10 {product} {ergonomic}
uintx GCDrainStackTargetSize = 64 {product} {ergonomic}
size_t InitialHeapSize = 534489216 {product} {ergonomic}
size_t MaxHeapSize = 8551827456 {product} {ergonomic}
uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic}
bool SegmentedCodeCache = true {product} {ergonomic}
bool UseCompressedClassPointers = true {lp64_product} {ergonomic}
bool UseCompressedOops = true {lp64_product} {ergonomic}
bool UseG1GC = true {product} {ergonomic}

Log output configuration:
#0: stdout all=warning uptime,level,tags
#1: stderr all=off uptime,level,tags

Environment Variables:

Signal Handlers:
SIGSEGV: [libjvm.so+0xe3c230], sa_mask[0]=11111111011111101101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGBUS: [libjvm.so+0xe3c230], sa_mask[0]=11111111011111101101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGFPE: [libjvm.so+0xe3c230], sa_mask[0]=11111111011111101101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGPIPE: [libjvm.so+0xc0d420], sa_mask[0]=11111111011111101101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGXFSZ: [libjvm.so+0xc0d420], sa_mask[0]=11111111011111101101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGILL: [libjvm.so+0xe3c230], sa_mask[0]=11111111011111101101111111111110, sa_flags=SA_RESTART|SA_SIGINFO
SIGUSR2: [libjvm.so+0xc0d2c0], sa_mask[0]=00000000000000000000000000000000, sa_flags=SA_RESTART|SA_SIGINFO
SIGHUP: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
SIGINT: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
SIGTERM: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none
SIGQUIT: SIG_DFL, sa_mask[0]=00000000000000000000000000000000, sa_flags=none

--------------- S Y S T E M ---------------

OS:CentOS Linux release 7.8.2003 (Core)
uname:Linux 2.6.32 FreeBSD 12.1-RELEASE-p3 r359640 KSSU12 x86_64
OS uptime: 10 days 9:30 hours
libc:glibc 2.17 NPTL 2.17
rlimit: STACK 524288k, CORE 9007199254740991k, NPROC 34203, NOFILE 22500, AS 9007199254740991k, CPU 9223372036854775807, DATA 33554432k, FSIZE 9007199254740991k
load average:1.84 1.74 1.75

MemTotal: 33405576 kB
MemFree: 32816868 kB
Buffers: 0 kB
Cached: 952076 kB
SwapTotal: 0 kB
SwapFree: 0 kB

/proc/sys/kernel/threads-max (system-wide limit on the number of threads):

/proc/sys/vm/max_map_count (maximum number of memory map areas a process may have):

/proc/sys/kernel/pid_max (system-wide limit on number of process identifiers):

Steal ticks since vm start: 0
Steal ticks percentage since vm start: 0.000

CPU:total 12 (initial active 12)
CPU Model and flags from /proc/cpuinfo:
model name : Intel® Core™ i7-3970X CPU @ 3.50GHz
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 b19 b21 mmxext mmx fxsr xmm sse2 b27 b28 b29 3dnow

Memory: 4k page, physical 33405576k(32816868k free), swap 0k(0k free)

vm_info: OpenJDK 64-Bit Server VM (11.0.7+10) for linux-amd64 JRE (11.0.7+10), built on Apr 15 2020 10:24:09 by “jenkins” with gcc 7.5.0