Skip to content

Commit 228ce7c

Browse files
committed
started java module example
1 parent 923e67d commit 228ce7c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

examples/java_module_example.kts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env kscript
2+
3+
4+
// See here for kscript installation instructions
5+
// https://github.com/holgerbrandl/kscript
6+
7+
//@file:DependsOn("com.amazon.redshift:redshift-jdbc4:1.1.17.1017")
8+
//@file:MavenRepository("redshift", "http://redshift-maven-repository.s3-website-us-east-1.amazonaws.com/release")
9+
//@file:CompilerOpts("-jvm-target 1.8")
10+
11+
import java.sql.*
12+
13+
14+
// See https://github.com/holgerbrandl/kscript/issues/220#issuecomment-503002241
15+
// todo which one works
16+
@file:KotlinOpts("-J'--add-modules java.sql'")
17+
@file:CompilerOpts("-J'--add-modules java.sql'")
18+
19+
20+
print("sql example is")
21+
print(Connection.TRANSACTION_SERIALIZABLE)

0 commit comments

Comments
 (0)