Skip to content

Commit ae10ce7

Browse files
committed
Merge branch 'master' into 'dev'
2 parents 1d27e5c + efee17a commit ae10ce7

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ scalive <pid>
5151

5252
Scalive only automatically adds `scala-library.jar`, `scala-compiler.jar`,
5353
`scala-reflect.jar`, and `scalive.jar` to the system classpath. If you want to
54-
load additional classes in other JARs, first add the JAR to the system class loader:
54+
load additional classes in other JARs, first run these in the REPL console to
55+
add the JAR to the system class loader:
5556

5657
```
5758
val cl = ClassLoader.getSystemClassLoader.asInstanceOf[java.net.URLClassLoader]
@@ -60,8 +61,8 @@ val jarbase = "mylib" // Will match "mylibxxx.jar", convenient when there's
6061
scalive.Classpath.findAndAddJar(cl, searchDirs, jarbase)
6162
```
6263

63-
Now the trick is just quit the REPL console and open it again. You will be able
64-
to use your classes in the JAR as normal:
64+
Now the trick is just quit the REPL console and connect it to the target process
65+
again. You will be able to use your classes in the JAR as normal:
6566

6667
```
6768
import mylib.foo.Bar

build.sbt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ autoScalaLibrary := false
88

99
javacOptions ++= Seq("-Xlint:deprecation")
1010

11+
// Ensure Scalive can run on Java 6
12+
scalacOptions += "-target:jvm-1.6"
13+
14+
// Ensure Scalive can run on Java 6
15+
javacOptions ++= Seq("-source", "1.6", "-target", "1.6")
16+
1117
// Add tools.jar to classpath
1218
// https://blogs.oracle.com/CoreJavaTechTips/entry/the_attach_api
1319
unmanagedJars in Compile := (file(System.getProperty("java.home")) / ".." / "lib" * "tools.jar").classpath
@@ -17,4 +23,4 @@ libraryDependencies += "org.scala-lang" % "scala-compiler" % "2.10.3"
1723
packageOptions in (Compile, packageBin) += Package.ManifestAttributes(
1824
"Main-Class" -> "scalive.AgentLoader",
1925
"Agent-Class" -> "scalive.Agent"
20-
)
26+
)

0 commit comments

Comments
 (0)