File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11'use strict' ;
22
33var path = require ( 'path' ) ;
4- var bindings = require ( "../build/Release/nodejavabridge_bindings" ) ;
4+ var binaryPath = path . resolve ( path . join ( __dirname , "../build/Release/nodejavabridge_bindings.node" ) ) ;
5+ var bindings = require ( binaryPath ) ;
56
67var java = module . exports = new bindings . Java ( ) ;
78java . classpath . push ( __dirname + "/../commons-lang3-node-java.jar" ) ;
89java . classpath . push ( __dirname + "/../src-java" ) ;
9- java . nativeBindingLocation = path . resolve ( path . join ( __dirname , "../build/Release/nodejavabridge_bindings.node" ) ) ;
10+ java . nativeBindingLocation = binaryPath ;
1011
1112var MODIFIER_PUBLIC = 1 ;
1213var MODIFIER_STATIC = 8 ;
Original file line number Diff line number Diff line change @@ -12,15 +12,15 @@ long v8ThreadId;
1212/* static*/ v8::Persistent<v8::FunctionTemplate> Java::s_ct;
1313
1414void my_sleep (int dur) {
15- #ifdef WINDOWS
15+ #ifdef WIN32
1616 Sleep (dur);
1717#else
1818 usleep (dur);
1919#endif
2020}
2121
2222long my_getThreadId () {
23- #ifdef WINDOWS
23+ #ifdef WIN32
2424 return (long )GetCurrentThreadId ();
2525#else
2626 return (long )pthread_self ();
You can’t perform that action at this time.
0 commit comments