Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added java "wrapper" module #626

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ very-quiet = $(if $V, $1, @$1)
ifeq ($(arch),aarch64)
java-targets :=
else
java-targets := $(out)/java/java.so $(out)/java/jni/balloon.so $(out)/java/jni/elf-loader.so $(out)/java/jni/networking.so \
$(out)/java/jni/stty.so $(out)/java/jni/tracepoint.so $(out)/java/jni/power.so $(out)/java/jni/monitor.so
java-targets := $(out)/java/jvm/java.so $(out)/java/jni/balloon.so $(out)/java/jni/elf-loader.so $(out)/java/jni/networking.so \
$(out)/java/jni/stty.so $(out)/java/jni/tracepoint.so $(out)/java/jni/power.so $(out)/java/jni/monitor.so \
$(out)/java/wrapper/javawrapper.so
endif

all: $(out)/loader.img $(java-targets)
Expand Down Expand Up @@ -744,9 +745,9 @@ drivers += drivers/clock-common.o
drivers += drivers/clockevent.o
drivers += drivers/ramdisk.o
drivers += core/elf.o
drivers += java/jvm_balloon.o
drivers += java/java_api.o
drivers += java/jni_helpers.o
drivers += java/jvm/jvm_balloon.o
drivers += java/jvm/java_api.o
drivers += java/jvm/jni_helpers.o
drivers += drivers/random.o
drivers += drivers/zfs.o
drivers += drivers/null.o
Expand Down
2 changes: 1 addition & 1 deletion core/mempool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <osv/shrinker.h>
#include <osv/defer.hh>
#include <osv/dbg-alloc.hh>
#include "java/jvm_balloon.hh"
#include "java/jvm/jvm_balloon.hh"
#include <boost/dynamic_bitset.hpp>
#include <boost/lockfree/stack.hpp>
#include <boost/lockfree/policies.hpp>
Expand Down
2 changes: 1 addition & 1 deletion core/mmu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <osv/error.h>
#include <osv/trace.hh>
#include <stack>
#include "java/jvm_balloon.hh"
#include "java/jvm/jvm_balloon.hh"
#include <fs/fs.hh>
#include <osv/file.h>
#include "dump.hh"
Expand Down
2 changes: 1 addition & 1 deletion java/jni/monitor.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <jni.h>
#include "monitor.hh"
#include "java/jvm_balloon.hh"
#include "java/jvm/jvm_balloon.hh"

/*
* Class: io_osv_OSvGCMonitor
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion java/jni_helpers.cc → java/jvm/jni_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include <jni.h>

#include "osv/mutex.h"
#include <osv/mutex.h>
#include "jni_helpers.hh"

using namespace std;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
30 changes: 30 additions & 0 deletions java/wrapper/demo-wrapper.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Demo wrapper file

# Include another file - NOTE: the file's contents are considered
# as if having been listed in its place.
@include /some/other/file

# The main class to invoke by the JVM - this is a MANDATORY configuration value
wrapper.java.mainclass=foo.bar.Baz

# wrapper.java.additional.N - extra JVM flags to pass - starts at 1
# NOTE: if there is a "gap" then the parsing stops at it - e.g., if
# wrapper.java.additional.1-5 are specified and the next one is wrapper.java.additional.7
# then only 1-5 are used - the rest are ignored (!!!)
wrapper.java.additional.1=-Xmx1024m
wrapper.java.additional.2=-Djava.awt.headless=true

# wrapper.java.classpath.N - classpath locations - starts at 1
# NOTE: if there is a "gap" then the parsing stops at it - e.g., if
# wrapper.java.classpath.1-5 are specified and the next one is wrapper.java.classpath.7
# then only 1-5 are used - the rest are ignored (!!!)
wrapper.java.classpath.1=/usr/lib/foo.jar
wrapper.java.classpath.2=/usr/lib/bar.jar

# wrapper.app.parameter.N - values to pass to the main class as arguments.
# NOTE: if there is a "gap" then the parsing stops at it - e.g., if
# wrapper.app.parameter.1-5 are specified and the next one is wrapper.app.parameter.7
# then only 1-5 are used - the rest are ignored (!!!)
wrapper.app.parameter.1=foo
wrapper.app.parameter.2=bar
wrapper.app.parameter.3=foo bar baz
Loading