Skip to content

Commit

Permalink
empty
Browse files Browse the repository at this point in the history
  • Loading branch information
rjolly committed Jun 17, 2022
1 parent dc8f67d commit 925574a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
7 changes: 6 additions & 1 deletion bin/linoleum
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/sh
LINOLEUM=`readlink -f $0`
LINOLEUM_HOME=`dirname $LINOLEUM`/..
java --add-opens jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED --add-opens java.scripting/com.sun.tools.script.shell=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/javax.swing.text=ALL-UNNAMED --add-opens java.desktop/javax.swing.text.html=ALL-UNNAMED -Djava.system.class.loader=linoleum.application.ClassLoader -Dscala.usejavacp=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -jar $LINOLEUM_HOME/linoleum.jar
OPS=
java -classpath $LINOLEUM_HOME/linoleum.jar linoleum.Version9
if [ $? -eq 0 ]; then
OPTS="--add-opens jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED --add-opens java.scripting/com.sun.tools.script.shell=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/javax.swing.text=ALL-UNNAMED --add-opens java.desktop/javax.swing.text.html=ALL-UNNAMED"
fi
java $OPTS -Djava.system.class.loader=linoleum.application.ClassLoader -Dscala.usejavacp=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -jar $LINOLEUM_HOME/linoleum.jar
7 changes: 6 additions & 1 deletion bin/linoleum.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
@echo off
set LINOLEUM_HOME=%~dp0..
java --add-opens jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED --add-opens java.scripting/com.sun.tools.script.shell=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/javax.swing.text=ALL-UNNAMED --add-opens java.desktop/javax.swing.text.html=ALL-UNNAMED -Dfile.encoding=UTF-8 -Djava.system.class.loader=linoleum.application.ClassLoader -Dscala.usejavacp=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -jar %LINOLEUM_HOME%\linoleum.jar
set OPTS=
java -classpath %LINOLEUM_HOME%\linoleum.jar linoleum.Version9
if %ERRORLEVEL% EQU 0 (
set OPTS=--add-opens jdk.jconsole/sun.tools.jconsole=ALL-UNNAMED --add-opens java.scripting/com.sun.tools.script.shell=ALL-UNNAMED --add-opens java.desktop/java.awt=ALL-UNNAMED --add-opens java.desktop/javax.swing.text=ALL-UNNAMED --add-opens java.desktop/javax.swing.text.html=ALL-UNNAMED
)
java %OPTS% -Dfile.encoding=UTF-8 -Djava.system.class.loader=linoleum.application.ClassLoader -Dscala.usejavacp=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.local.only=false -jar %LINOLEUM_HOME%\linoleum.jar
8 changes: 4 additions & 4 deletions init.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ function open(name, app) {
function exit(code) {
if (typeof(frame) == 'undefined') {
if (code) {
java.lang.System.exit(code + 0);
java.lang.System.exit(code + 0);
} else {
java.lang.System.exit(0);
java.lang.System.exit(0);
}
} else {
frame.doDefaultCloseAction();
Expand Down Expand Up @@ -328,11 +328,11 @@ function gc() {
}

function version() {
return java.lang.System.getProperty("java.version");
return java.lang.System.getProperty("java.version");
}

function exec(command) {
return java.lang.Runtime.getRuntime().exec(command);
return java.lang.Runtime.getRuntime().exec(command);
}

// requires commons-io#commons-io;1.3.1
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/linoleum/Version9.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package linoleum;

public class Version9 {
public static void main(final String args[]) {
final String s = System.getProperty("java.version");
System.exit(Integer.parseInt(s.substring(0, s.indexOf("."))) < 9?1:0);
}
}

0 comments on commit 925574a

Please sign in to comment.