File tree 1 file changed +1
-9
lines changed
src/main/java/com/caoccao/javet/interop
1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change 36
36
* @since 0.8.0
37
37
*/
38
38
final class JavetClassLoader extends ClassLoader {
39
- private static final String ERROR_NODE_JS_IS_NOT_SUPPORTED_ON_ANDROID = "Node.js is not supported on Android." ;
40
39
private static final String JAVET_LIB_LOADER_CLASS_NAME = JavetLibLoader .class .getName ();
41
40
private static final String METHOD_LOAD = "load" ;
42
41
private static final String METHOD_SET_LIB_LOADING_LISTENER = "setLibLoadingListener" ;
@@ -66,9 +65,7 @@ final class JavetClassLoader extends ClassLoader {
66
65
IV8Native getNative () throws JavetException {
67
66
if (JavetOSUtils .IS_ANDROID ) {
68
67
if (jsRuntimeType .isNode ()) {
69
- throw new JavetException (
70
- JavetError .LibraryNotLoaded ,
71
- SimpleMap .of (JavetError .PARAMETER_REASON , ERROR_NODE_JS_IS_NOT_SUPPORTED_ON_ANDROID ));
68
+ return new NodeNative ();
72
69
}
73
70
return new V8Native ();
74
71
} else {
@@ -95,11 +92,6 @@ IV8Native getNative() throws JavetException {
95
92
*/
96
93
void load () throws JavetException {
97
94
if (JavetOSUtils .IS_ANDROID ) {
98
- if (jsRuntimeType .isNode ()) {
99
- throw new JavetException (
100
- JavetError .LibraryNotLoaded ,
101
- SimpleMap .of (JavetError .PARAMETER_REASON , ERROR_NODE_JS_IS_NOT_SUPPORTED_ON_ANDROID ));
102
- }
103
95
JavetLibLoader javetLibLoader = new JavetLibLoader (jsRuntimeType );
104
96
javetLibLoader .load ();
105
97
} else {
You can’t perform that action at this time.
0 commit comments