simple.java

来自「SHARK工作流引擎的启动测试」· Java 代码 · 共 36 行

JAVA
36
字号
package first;

import org.enhydra.shark.Shark;

import java.util.Properties;
import java.io.FileInputStream;

/**
 * Does nothing more than start the Shark engine.
 */
public class Simple
{
   public static void main(String[] args)
   {
      try
      {
         Properties props = new Properties();
         props.load(new FileInputStream("C:/Shark/Shark.conf"));

         System.out.println("Enginename from Shark.conf is : " + props.getProperty("enginename"));

         // Make SURE every instance of shark that connects to the same database uses a different
         // enginename.
         props.setProperty("enginename", "firstEngine");

         Shark.configure(props);

      }
      catch (Exception e)
      {
         // It's not like I am going to revive the thing if it crashes...
         e.printStackTrace();
      }
   }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?