Comments (6)
Johns-MacBook-Air:swift johnholdsworth$ find $JAVA_HOME -name libjvm.*
/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/server/libjvm.dylib
Johns-MacBook-Air:swift johnholdsworth$
export JVM_LIBRARY_PATH=/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home/jre/lib/server
from swiftjava.
@johnno1962 thanks for you reply. i tried your command but did not work. can you explain a bit what is this doing?
what is johnholdsworth$ suppose to be? I guess it should be replaced by something else, isn't it? Look forward to hear from you again.
from swiftjava.
You need to find your JAVA_HOME where you Java installation is it will be something like:
echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
then setup a new variable for the JVM_LIBRARY_PATH
export JVM_LIBRARY_PATH=$JAVA_HOME/jre/lib/server
then the command should work.
from swiftjava.
On Macos The best way to find Java home is:
export JAVA_HOME=/usr/libexec/java_home --version 1.8
Then you can reference the env variable in your build
from swiftjava.
How silly I was. now it works after I set the JAVA_HOME correctly. thanks guys!
from swiftjava.
@gagaJay java 1.8 needed right? it doesn't work on 1.6 as JAVA_HOME? (Solved)
apple$ /usr/libexec/java_home -V
Matching Java Virtual Machines (3):
11.0.2, x86_64: "OpenJDK 11.0.2" /Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home
1.6.0_65-b14-468, x86_64: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
1.6.0_65-b14-468, i386: "Java SE 6" /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Error for jar: while using 1.6 as JAVA_HOME (solved after changing it to 11)
apples-Air:SwiftJava-master apple$ ./genswift.sh org.slf4j /Workspace/R_AND_D_SWIFT/codegen/libs/slf4j-api-1.7.21.jar
genswift.java:795: local variable isProtocol is accessed from within inner class; needs to be declared final .compareTo(swiftSignatureFor( newMethod(o2), isProtocol, true, true, null));
genswift.java:794: local variable isProtocol is accessed from within inner class; needs to be declared final return statics != 0 ? statics : swiftSignatureFor( newMethod(o1), isProtocol, true, true, null)
2 errors
after Updating JAVA_HOME to OpenJdk 11:
error:
apple$ ./genswift.sh org.slf4j /Workspace//R_AND_D_SWIFT/codegen/libs/slf4j-api-1.7.21.jar
java.lang.ClassNotFoundException: org.slf4j.
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at genswift.generate(genswift.java:401)
at genswift.main(genswift.java:302)
apples-Air:SwiftJava-master apple$ ./genswift.sh org.slf4j /Workspace/Subramanya/OSXJVM/R_AND_D_SWIFT/codegen/libs/slf4j-api-1.7.26.jar
java.lang.ClassNotFoundException: org.slf4j.
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at genswift.generate(genswift.java:401)
at genswift.main(genswift.java:302)
from swiftjava.
Related Issues (7)
- x86 support HOT 2
- Cloning https://github.com/SwiftJava/javax_swing.git HOT 6
- how to run the sample code? HOT 1
- How does genswift.sh work? HOT 12
- how to compile an android library? HOT 2
- more information needed on swiftjava macOS project xcode project setup for generated codes, more step by step details needed HOT 1
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 swiftjava.