Changeset 38914 in vbox
- Timestamp:
- Sep 30, 2011 10:12:01 AM (13 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/Makefile.kmk
r38796 r38914 933 933 $(VBOX_JAR) cf $@ -C $(VBOX_JMSCOM_JDEST) . 934 934 935 ## @todo compile TestVBox.java (see below) to have sanity checking 936 935 937 endif # VBOX_WITH_JMSCOM 936 938 … … 943 945 javagluesample_SOURCES = \ 944 946 $(VBOX_PATH_MAIN_SRC)/glue/tests/TestVBox.java=>TestVBox.java \ 945 $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile .kmk=>Makefile.kmk947 $(VBOX_PATH_MAIN_SRC)/glue/tests/Makefile=>Makefile 946 948 947 949 updatenls:: -
trunk/src/VBox/Main/glue/tests/Makefile
r38820 r38914 1 1 # 2 # Copyright (C) 2010 Oracle Corporation2 # Copyright (C) 2010-2011 Oracle Corporation 3 3 # 4 4 # This file is part of VirtualBox Open Source Edition (OSE), as … … 10 10 # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 11 11 # 12 ifeq ($(KBUILD_HOST),darwin)13 VBOX_BIN=/Applications/VirtualBox.app/Contents/MacOS14 VBOX_SDK=$(VBOX_BIN)/sdk15 JAVA15=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java16 # JAVA_ARGS += -d3217 endif18 12 19 ifeq ($(KBUILD_HOST),linux) 20 VBOX_BIN=/home/nike/work/ws/out/linux.amd64/debug/bin 21 VBOX_SDK=$(VBOX_BIN)/sdk 22 endif 13 HOSTOS=linux 14 VBOX_BIN = ../../../.. 15 VBOX_SDK = ../../.. 16 JACOB_DIR = 17 CLASSPATH = . 23 18 24 ifeq ($(KBUILD_HOST),win) 25 VBOX_BIN=e:/ws/out/win.amd64/debug/bin 26 VBOX_SDK=$(VBOX_BIN)/sdk 27 JACOB_DIR=s:/jacob-1.15-M3/ 19 ifeq ($(HOSTOS),win) 28 20 JACOB_JAR=$(JACOB_DIR)/jacob.jar 29 CLASSPATH += $(JACOB_JAR)$(SEP)30 JAVA_ARGS += -Djava.library.path=$(JACOB_DIR)31 endif32 33 ifeq ($(KBUILD_HOST),win)34 21 VBOX_JAR=$(VBOX_SDK)/bindings/mscom/java/vboxjmscom.jar 35 22 SEP=\; 23 JAVA_COM_ARGS += -Djava.library.path=$(JACOB_DIR) 24 CLASSPATH += $(JACOB_JAR)$(SEP) 36 25 else 37 26 VBOX_JAR=$(VBOX_SDK)/bindings/xpcom/java/vboxjxpcom.jar 38 27 SEP=: 28 JAVA_COM_ARGS += -Dvbox.home=$(VBOX_BIN) 39 29 endif 40 30 41 31 VBOX_JAR_WS=$(VBOX_SDK)/bindings/webservice/java/jax-ws/vboxjws.jar 42 32 43 JAVA_ARGS += -Dvbox.home=$(VBOX_BIN)44 CLASSPATH := $(CLASSPATH)$(VBOX_JAR)$(SEP).45 33 46 all: testvb34 all: ws/TestVBox.class com/TestVBox.class 47 35 48 testvb: 49 javac -cp $(VBOX_JAR) TestVBox.java 50 java $(JAVA_ARGS) -cp $(CLASSPATH) TestVBox 36 test: ws/test-TestVBox com/test-TestVBox 51 37 52 JAXLIBS=../../webservice/jaxlibs/ 53 # -noverify could be needed due http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=eb3fcd8f72ab4713f96e378a7575?bug_id=6614974 54 testws15: 55 javac -target 1.5 -source 1.5 -cp $(VBOX_JAR) TestVBox.java 56 $(JAVA15) $(JAVA_ARGS) -cp $(VBOX_JAR_WS)$(SEP)$(CLASSPATH)$(SEP)$(JAXLIBS)/jaxws-api.jar$(SEP)$(JAXLIBS)/jaxws-rt.jar \ 57 TestVBox -w -url http://localhost:18083 38 com/TestVBox.class: 39 @mkdir com 2>/dev/null || true 40 javac -g -d com -cp $(VBOX_JAR)$(SEP)$(CLASSPATH) TestVBox.java 58 41 59 testws: 60 javac -cp $(VBOX_JAR_WS) TestVBox.java 61 java $(JAVA_ARGS) -cp $(VBOX_JAR_WS)$(SEP)$(CLASSPATH) TestVBox -w -url http://localhost:18083 42 com/test-TestVBox: com/TestVBox.class 43 java $(JAVA_COM_ARGS) -cp com$(SEP)$(VBOX_JAR)$(SEP)$(CLASSPATH) TestVBox 44 45 ws/TestVBox.class: 46 @mkdir ws 2>/dev/null || true 47 javac -d ws -cp $(VBOX_JAR_WS)$(SEP)$(CLASSPATH) TestVBox.java 48 49 ws/test-TestVBox: ws/TestVBox.class 50 java $(JAVA_WS_ARGS) -cp ws$(SEP)$(VBOX_JAR_WS)$(SEP)$(CLASSPATH) TestVBox -w -url http://localhost:18083/ -
trunk/src/VBox/Main/glue/tests/TestVBox.java
r36281 r38914 1 1 /* $Id$ */ 2 3 /* Small sample/testcase which demonstrates that the same source code can 4 * be used to connect to the webservice and (XP)COM APIs. */ 5 2 6 /* 3 * Copyright (C) 2010 Oracle Corporation7 * Copyright (C) 2010-2011 Oracle Corporation 4 8 * 5 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 11 15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 12 16 */ 13 import org.virtualbox_4_ 1.*;17 import org.virtualbox_4_2.*; 14 18 import java.util.List; 15 19 import java.util.Arrays; … … 60 64 61 65 try { 62 for (int i=0; i< 100; i++)66 for (int i=0; i<50; i++) 63 67 { 64 68 System.out.print("."); 65 IEvent ev = es.getEvent(listener, 1000);69 IEvent ev = es.getEvent(listener, 500); 66 70 if (ev != null) 67 71 { … … 82 86 for (IMachine m : machs) 83 87 { 84 System.out.println("VM name: " + m.getName());// + ", RAM size: " + m.getMemorySize() + "MB"); 85 System.out.println(" HWVirt: " + m.getHWVirtExProperty(HWVirtExPropertyType.Enabled) 86 + ", Nested Paging: " + m.getHWVirtExProperty(HWVirtExPropertyType.NestedPaging) 87 + ", PAE: " + m.getCPUProperty(CPUPropertyType.PAE) ); 88 String name; 89 Long ram = 0L; 90 boolean hwvirtEnabled = false, hwvirtNestedPaging = false; 91 boolean paeEnabled = false; 92 boolean inaccessible = false; 93 try 94 { 95 name = m.getName(); 96 ram = m.getMemorySize(); 97 hwvirtEnabled = m.getHWVirtExProperty(HWVirtExPropertyType.Enabled); 98 hwvirtNestedPaging = m.getHWVirtExProperty(HWVirtExPropertyType.NestedPaging); 99 paeEnabled = m.getCPUProperty(CPUPropertyType.PAE); 100 } 101 catch (VBoxException e) 102 { 103 name = "<inaccessible>"; 104 inaccessible = true; 105 } 106 System.out.println("VM name: " + name); 107 if (!inaccessible) 108 { 109 System.out.println(" RAM size: " + ram + "MB" 110 + ", HWVirt: " + hwvirtEnabled 111 + ", Nested Paging: " + hwvirtNestedPaging 112 + ", PAE: " + paeEnabled); 113 } 88 114 } 89 115 } … … 171 197 System.out.println("VirtualBox version: " + vbox.getVersion() + "\n"); 172 198 testEnumeration(mgr, vbox); 173 //testReadLog(mgr, vbox);199 testReadLog(mgr, vbox); 174 200 testStart(mgr, vbox); 175 201 testEvents(mgr, vbox.getEventSource()); -
trunk/src/VBox/Main/webservice/Makefile.kmk
r38802 r38914 402 402 $(VBOX_JAR) cf $@ -C $(VBOX_JWS_GEN)/java . 403 403 404 ## @todo compile ../glue/tests/TestVBox.java to have sanity checking 405 404 406 endif # VBOX_WITH_JWS 405 407
Note:
See TracChangeset
for help on using the changeset viewer.