- Jun 04, 2013
-
-
Nadav Har'El authored
Added the possibility to pass to cli.jar a command, which it runs instead of taking commands interactively. Note that the initialization script is run before the given command. After this patch, scripts/run.py -e "java.so -jar /java/cli.jar" Continues to run the interactive command line editor loop, as before. But additionally, one can do: scripts/run.py -e "java.so -jar /java/cli.jar ls" To run just the command "ls" and exit - exactly as if the user would type this command on the command line and exit the VM. The given command can be, of course, much longer. For example to run Jetty after the CLI's normal initialization script, the following monster can be used: scripts/run.py -n -e "java.so -jar /java/cli.jar java -classpath /jetty/* org.eclipse.jetty.xml.XmlConfiguration /jetty/jetty.xml" (Funny how a single command should say "java" 3 times and "jetty" 4 times :-))
-
Nadav Har'El authored
Add a "java" command to the CLI, using the same syntax of java.so and attempting to emulate as closely as possible the "java" command on Linux. So for example one can run java Hello to run /java/Hello.class (/java is on the classpath by default), or java -jar /java/bench.jar to run the main class of this jar, or a more sophisticated command lines, such as the following which runs Jetty (if the appropriate files are in your image): java -classpath /jetty/* org.eclipse.jetty.xml.XmlConfiguration /jetty/jetty.xml Note that like java.so, the new "java" command basically runs the RunJava class (/java/RunJava.class). Remember that java.so adds /java to the parent class loader, so we can always find the RunJava class even though it's not in cli.jar or cloudius.jar).
-
- Jun 03, 2013
- May 28, 2013
-
-
Guy Zana authored
-
- May 19, 2013
- May 16, 2013
-
-
Nadav Har'El authored
Until now, OSV's console defaulted to raw mode, to make the CLI happy. The problem is that on Linux, applications expect to be run in cooked mode, so if we ever run a simple application that tries to read user input, it can be confused. This patch makes OSV console default to cooked mode, and the CLI switch to raw mode before reading an input line - and reset to the default mode just before running the user's command. Unfortunately, we had to resort to adding a JNI class "Stty", since Java has no builtin support for the ioctls required for changing the tty settings.
-
- May 14, 2013
- May 09, 2013
-
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
allows commands to specify a delimiter between tab completion suggestions, the default is '\t' in case this function is not present in the command interface.
-
Guy Zana authored
-
Guy Zana authored
Example: [/]$ cd dev tmp tests usr etc console java [/]$ cd usr/{TAB} lib share [/]$ cd usr/lib/{TAB} jvm jni [/]$ cd usr/lib/jv{TAB}m/{TAB}jre/{TAB}lib/{TAB}amd64/{ENTER} headless server [/usr/lib/jvm/jre/lib/amd64]$
-
Guy Zana authored
the tab_pretty(arg) function is called just before printing an autocompleted suggestion, it may be used by commands to prettify their autocompletion output, will shortly be used by the cd command
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
-
- May 08, 2013
-
-
Nadav Har'El authored
class-static variable, which is not only strange, it also means we cannot concurrently run several programs in several threads. Change it so run() returns the (32-bit) return value, and when execution fails (e.g., file not found), it throws an IOException. Note that unlike Unix where main()'s return value is limited to 8 bits, here we decided to allow the full gamut (63-bit) of return values from main(). main() may return -23 or 2323813 and this does not indicate an error running it (only an exception indicates an error). This patch also removes the arbitrary limit of 256 command line arguments (not that anyone would need more...).
-
Guy Zana authored
All Java tests need to implement the Test interface and be registered with TestRunner in order to be available to the test cli command. TCPEchoServerTest is no longer accessible from javascript, instead, TestRunner is now the interface of JS for running tests.
-
- May 07, 2013
- Apr 30, 2013
-
-
Guy Zana authored
1. a simple command that invokes the run method of a test class 2. supports autocomplete with test names
-
- Apr 22, 2013
-
-
Guy Zana authored
run a javascript CLI by default on boot. 1. implements trivial versions of ls, cat, cd, pwd, help 2. needs raw mode from the console, handles backspace and tab 3. provide autocomplete support
-