Skip to content

Commit

Permalink
Merge branch 'master' into develop-for-20220822
Browse files Browse the repository at this point in the history
  • Loading branch information
oldmanpushcart authored Jan 25, 2023
2 parents 3d37008 + 5ce4743 commit f9f650c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,24 @@ try {
![jvm-sandbox-architecture](https://github.com/alibaba/jvm-sandbox/wiki/img/jvm-sandbox-architecture.png)

## 快速安装

- **下载并安装**
- **下载并安装或自行打包**

```shell
# 下载最新版本的JVM-SANDBOX
wget http://ompc.oss-cn-hangzhou.aliyuncs.com/jvm-sandbox/release/sandbox-stable-bin.zip
# 下载最新版本的JVM-SANDBOX,oss已到期,或者oss链接不可访问时,可选择自行打包
wget https://ompc.oss-cn-hangzhou.aliyuncs.com/jvm-sandbox/release/sandbox-1.3.3-bin.zip

# 解压
unzip sandbox-stable-bin.zip
unzip sandbox-1.3.3-bin.zip
```
```shell
#自行打包
cd bin
./sandbox-packages.sh
#target路径下有多种构建件类型,选择一个合适的使用
cd ../target
```


- **挂载目标应用**

```shell
Expand Down
2 changes: 1 addition & 1 deletion doc/JVM-SANDBOX-USER-GUIDE-Chinese.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ EVENT_POOL_KEY_MAX : 2000

- 冻结

模块进入到冻结状态之后,之前侦听的所有沙箱事件都将被屏蔽。需要注意的是,冻结的模块不会退回事件侦听的代码插桩,只有`delete()``wathcing()`或者模块被卸载的时候插桩代码才会被清理。
模块进入到冻结状态之后,之前侦听的所有沙箱事件都将被屏蔽。需要注意的是,冻结的模块不会退回事件侦听的代码插桩,只有`delete()``watching()`或者模块被卸载的时候插桩代码才会被清理。

### 配置文件

Expand Down
2 changes: 1 addition & 1 deletion doc/JVM-SANDBOX-USER-GUIDE-English.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Then the sandbox has been successfully implanted in the target JVM, and opened a

- onFreeze

After the module enters the frozen state, all the sandbox events that are listening before will be blocked. It should be noted that the frozen module will not return the event to listen to the code plug, only `delete ()`, `wathcing ()` or module is unloaded when the plug code will be cleared.
After the module enters the frozen state, all the sandbox events that are listening before will be blocked. It should be noted that the frozen module will not return the event to listen to the code plug, only `delete ()`, `watching ()` or module is unloaded when the plug code will be cleared.

### Configuration file

Expand Down
4 changes: 2 additions & 2 deletions sandbox-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@
<artifactId>asm-util</artifactId>
<version>9.4</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>

</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,12 @@ private InputStream getResourceAsStream(final String javaClassName) {
InputStream ins = null;
if(isBootstrapClassLoader()) {
try {
Class<?> clz = Class.forName(javaClassName, false, null);
ins = clz.getResourceAsStream("/" + resourceName);
} catch (ClassNotFoundException e) {
ins = Object.class.getResourceAsStream("/" + resourceName);
if(null == ins) {
Class<?> clz = Class.forName(javaClassName, false, null);
ins = clz.getResourceAsStream("/" + resourceName);
}
} catch (Throwable e) {
// pass
}
} else {
Expand Down

0 comments on commit f9f650c

Please sign in to comment.