Authors: russell@unturf.com · brackishbert@gmail.com · foxhop.net · TimeHexOn.com Patches, unit tests, benchmarks, whitepaper, and outreach briefs. Public domain — no copyright claimed. Use freely.
14 lines
323 B
JavaScript
14 lines
323 B
JavaScript
//this is the first line of Test7.js
|
|
var filename;
|
|
try {
|
|
load("nashorn:mozilla_compat.js");
|
|
} catch (e) {
|
|
//ignored
|
|
}
|
|
importPackage(java.io);
|
|
importPackage(java);
|
|
var f = new File(filename);
|
|
var r = new BufferedReader(new InputStreamReader(new FileInputStream(f)));
|
|
|
|
var firstLine = r.readLine();
|
|
print(firstLine);
|