-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Hi there,
I am trying to run BSim on Windows 10 64 bit. The program compiles successfully using ant compile.
However, when I run my simulation using the following input, I get an error. The program runs completely fine if it is compiled and run using IntelliJ IDEA. This problem only happens when running using the command line.
java -cp .;../../lib/core.jar;../../lib/vecmath.jar;../../lib/objimport.jar;../../lib/bsim-osp.jar;../../lib/jcommander-1.49-SNAPSHOT.jar Fall2020/NeighbourInteractions'
The error I get is:
Exception in thread "main" java.lang.ExceptionInInitializerError
at processing.core.PFont.loadFonts(Unknown Source)
at processing.core.PFont.findFont(Unknown Source)
at bsim.draw.BSimP3DDrawer.<init>(Unknown Source)
at Fall2020.NeighbourInteractions$2.<init>(Unknown Source)
at Fall2020.NeighbourInteractions.run(Unknown Source)
at Fall2020.NeighbourInteractions.main(Unknown Source)
Caused by: java.lang.StringIndexOutOfBoundsException: begin 0, end 3, length 2
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3734)
at java.base/java.lang.String.substring(String.java:1903)
at processing.core.PApplet.<clinit>(Unknown Source)
... 6 more
The class Fall2020.NeighbourInteractions is derived from BSimChenOscillator. I have just removed the chemical fields and set it so that there is only one type of bacteria.
It seems the issue is with Processing 1.5, which is 9 years old now and could use an update. However, since the program runs just fine in IntelliJ IDEA I am very confused. Changing the font from MS Trebuchet to another font does not fix the problem.