File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,9 @@ This example wraps an [open-source Java library](https://github.com/gazman-sdk/q
1212git clone https://github.com/gazman-sdk/quadratic-sieve-Java
1313cd quadratic-sieve-Java
1414sh ./gradlew jar
15+ cd ..
1516```
1617
17- Then, copy the resulting Jar file (` ./build/libs/QuadraticSieve-1.0.jar ` ) into the ` Samples/JavaSieve ` directory.
18-
1918Now we're ready to build and run the Swift program from ` Samples/JavaSieve ` :
2019
2120```
Original file line number Diff line number Diff line change 1515import JavaKit
1616import JavaMath
1717
18- let jvm = try JavaVirtualMachine . shared ( classpath: [ " QuadraticSieve-1.0.jar " ] )
18+ let jvm = try JavaVirtualMachine . shared ( classpath: [
19+ " quadratic-sieve-Java/build/libs/QuadraticSieve-1.0.jar " ,
20+ " . " ,
21+ ] )
22+
1923do {
2024 let sieveClass = try JavaClass < SieveOfEratosthenes > ( environment: jvm. environment ( ) )
2125 for prime in sieveClass. findPrimes ( 100 ) ! {
Original file line number Diff line number Diff line change 11{
2- "classpath" : "QuadraticSieve-1.0.jar",
2+ "classpath" : ".:quadratic-sieve-Java/build/libs/ QuadraticSieve-1.0.jar",
33 "classes" : {
44 "com.gazman.quadratic_sieve.QuadraticSieve" : "QuadraticSieve",
55 "com.gazman.quadratic_sieve.core.BaseFact" : "BaseFact",
You can’t perform that action at this time.
0 commit comments