File tree Expand file tree Collapse file tree
org.omg.sysml.jupyter.kernel/src/main/java/org/omg/sysml/jupyter/kernel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,11 +35,18 @@ public class ISysML {
3535
3636 private static volatile SysMLKernel kernel ;
3737
38+ public static void initialize () {
39+ System .setProperty ("file.encoding" , "UTF-8" );
40+ kernel = new SysMLKernel ();
41+ }
42+
3843 public static void main (String [] args ) throws Exception {
3944 if (args .length < 1 ) {
4045 throw new IllegalArgumentException ("Missing connection file argument" );
4146 }
4247
48+ initialize ();
49+
4350 Path connectionFile = Paths .get (args [0 ]);
4451
4552 if (!Files .isRegularFile (connectionFile ))
@@ -52,8 +59,6 @@ public static void main(String[] args) throws Exception {
5259 KernelConnectionProperties connProps = KernelConnectionProperties .parse (contents );
5360 JupyterConnection connection = new JupyterConnection (connProps );
5461
55-
56- kernel = new SysMLKernel ();
5762 kernel .becomeHandlerForConnection (connection );
5863
5964 connection .connect ();
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ public class SysMLKernel extends BaseKernel {
4545 private final Magics magics ;
4646 private final MyMagicParser magicParser ;
4747
48+ public Magics getMagics () {
49+ return magics ;
50+ }
51+
4852 public SysMLKernel () {
4953 this .interactive = SysMLInteractive .getInstance ();
5054 Optional <String > libraryPath = Optional .ofNullable (System .getenv (ISysML .LIBRARY_PATH_KEY ));
You can’t perform that action at this time.
0 commit comments