Working with MCRTsim simulator on a LINUX system

Viewed 38

I am trying to use the MCRTsim simulator in my research work. As documented in https://resl.csie.nptu.edu.tw/dokuwiki/doku.php?id=guide, I run this command java -jar MCRTsim/dist/MCRTsim2.8.jar in specified directory, but the simulation window did not pop up. Instead, I got following exceptions:

Exception in thread "main" java.lang.NullPointerException  
at java.base/java.io.Reader.<init>(Reader.java:167)
at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:109)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:2440)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:1084)
at org.apache.commons.io.IOUtils.toString(IOUtils.java:1110)
at userInterface.frontEnd.SimulationViewer.setComboBox(SimulationViewer.java:529)
at userInterface.frontEnd.SimulationViewer.initialize(SimulationViewer.java:359)
at userInterface.frontEnd.SimulationViewer.<init>(SimulationViewer.java:97)
at userInterface.UserInterface.initialize(UserInterface.java:45)
at userInterface.UserInterface.<init>(UserInterface.java:31)
at mcrtsim.MCRTsim.main(MCRTsim.java:55)

I am using Ubuntu system and JDK 11. I have not used Java much. I am not able to understand what this error is saying. Would anyone please help me with this?

1 Answers

Finally, I got the solution to this problem. I think this simulator is compatible with openjdk-8. So, I removed openjdk-11 from my system and installed openjdk-8.

After installing openjdk-8, I run the command java -jar dist/MCRTsim2.8.jar . This time I got the following error:

Exception in thread "main" java.awt.AWTError: Assistive Technology not 
found: org.GNOME.Accessibility.AtkWrapper  
at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:807)  
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:886)  
at java.awt.Window.getToolkit(Window.java:1358)  
at java.awt.Window.init(Window.java:506)  
at java.awt.Window.<init>(Window.java:537)  
at java.awt.Frame.<init>(Frame.java:420)  
at javax.swing.JFrame.<init>(JFrame.java:233)  
at userInterface.UserInterface.initialize(UserInterface.java:37)  
at userInterface.UserInterface.<init>(UserInterface.java:31)  
at mcrtsim.MCRTsim.main(MCRTsim.java:55)  

After that, I followed this blog https://askubuntu.com/questions/695560/assistive-technology-not-found-awterror to rectify the above error.

I just commented this line #assistive_technologies=org.GNOME.Accessibility.AtkWrapper in /etc/java-8-openjdk/accessibility.properties file.

And, it started working.

Related