Comments (3)
I ran into a similar problem with the CLASSPATH; it looks like it needs to be set before importing jnius
.
I'm also curious about setting JVM options.
from pyjnius.
I have the same problem and I the "make tests" command didn't run any test case.
make tests
javac jnius/src/org/jnius/NativeInvocationHandler.java
...
4 warnings generated.
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. -g build/temp.macosx-10.9-intel-2.7/jnius/jnius.o -o /Users/hotdog16/Downloads/pyjnius-master/jnius/jnius.so -framework JavaVM
cd tests && javac org/jnius/HelloWorld.java
cd tests && javac org/jnius/BasicsTest.java
cd tests && javac org/jnius/MultipleMethods.java
cd tests && javac org/jnius/SimpleEnum.java
cd tests && javac org/jnius/InterfaceWithPublicEnum.java
cd tests && javac org/jnius/ClassArgument.java
cd tests && env PYTHONPATH=..: nosetests-2.7 -v
Ran 0 tests in 0.002s
OK
When I run test by myself:
cd tests/
PYTHONPATH=..: nosetests test_basics.py
EEEEEEEEEEEEE
ERROR: test_instance_fields (test_basics.BasicsTest)
Traceback (most recent call last):
File "/Users/hotdog16/Downloads/pyjnius-master/tests/test_basics.py", line 43, in test_instance_fields
test = autoclass('org.jnius.BasicsTest')()
File "/Library/Python/2.7/site-packages/jnius/reflect.py", line 150, in autoclass
c = find_javaclass(clsname)
File "jnius_export_func.pxi", line 23, in jnius.find_javaclass (jnius/jnius.c:12356)
JavaException: Class not found 'org/jnius/BasicsTest'
....
from pyjnius.
Solved, The mac OS X jdk issue.
Go to mac developer page and search java to download the newest jdk(JavaForOSX2013-05.dmg)
https://developer.apple.com/downloads/index.action
reinstall pyjnius, it work!
from pyjnius.
Related Issues (20)
- `pypa/gh-action-pypi-publish@master`. The `master` branch of this project has been sunset and will not receive any updates. HOT 3
- Support for arm64(M1 Chip) arch in MACHINE2CPU HOT 2
- pyjnius 1.4.2 and Cython 3.0.0 HOT 4
- pyjnius build error on s390x HOT 10
- ClassNotFoundException for android.media.midi.MidiManager.OnDeviceOpenedListener HOT 3
- unexpected error for jdk17 HOT 4
- Crashes on Apple M1 HOT 27
- How to add everything under M2 repository to pyjnius classpath? HOT 2
- DeprecationWarning: pkg_resources is deprecated as an API
- pyjnius build error, still coming HOT 10
- Including a JAR on Android HOT 2
- Support mail address is broken HOT 2
- OverflowError: value too large to convert to jshort HOT 4
- How to create Webview with FileChooser HOT 1
- Moderinze `java` code? HOT 2
- installation documentation could be refreshed HOT 3
- Usage without JDK HOT 6
- AttributeError: 'Class' object has no attribute '_JavaClass__cls_storage' HOT 4
- Running python script on Android but in Docker container HOT 1
- Getting a pointer to JavaVM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyjnius.