Revision | 87 (tree) |
---|---|
Time | 2020-05-18 18:57:06 |
Author | hirukawa_ryo |
* exewrap 1.6.0
サービスアプリケーションで標準出力・標準エラー出力への書き込みがイベントログに記録される機能を廃止しました。
サービス実行時の標準出力・標準エラー出力への書き込みはGUIアプリケーションと同様にファイルに記録されます。この機能はNOLOG拡張フラグで無効になります。
サービス実行ではなくコンソールで通常プロセスとして実行した場合には標準出力・標準エラー出力への書き込みは既定の動作のままコンソールに出力されます。
@@ -1,10 +1,13 @@ | ||
1 | +import java.io.IOException; | |
1 | 2 | |
2 | 3 | public class ConsoleSample2 { |
3 | 4 | |
4 | - public static void main(String[] args) { | |
5 | + public static void main(String[] args) throws IOException { | |
5 | 6 | |
6 | - System.out.println("java.runtime.version=" + System.getProperty("java.runtime.version")); | |
7 | - System.out.println("JAVA_HOME=" + System.getenv("JAVA_HOME")); | |
7 | + System.out.println("Hello, World!!"); | |
8 | 8 | |
9 | + System.out.println("Enterキーを押すと終了します。"); | |
10 | + System.in.read(); | |
11 | + | |
9 | 12 | } |
10 | 13 | } |
@@ -2,5 +2,5 @@ | ||
2 | 2 | |
3 | 3 | javac -encoding UTF-8 ConsoleSample2.java |
4 | 4 | jar cfe ConsoleSample2.jar ConsoleSample2 ConsoleSample2.class |
5 | -exewrap ConsoleSample2.jar | |
5 | +exewrap -e SINGLE ConsoleSample2.jar | |
6 | 6 |
@@ -0,0 +1,10 @@ | ||
1 | + | |
2 | +public class ConsoleSample2 { | |
3 | + | |
4 | + public static void main(String[] args) { | |
5 | + | |
6 | + System.out.println("java.runtime.version=" + System.getProperty("java.runtime.version")); | |
7 | + System.out.println("JAVA_HOME=" + System.getenv("JAVA_HOME")); | |
8 | + | |
9 | + } | |
10 | +} |
@@ -0,0 +1,6 @@ | ||
1 | +CD /D %~dp0 | |
2 | + | |
3 | +javac -encoding UTF-8 ConsoleSample3.java | |
4 | +jar cfe ConsoleSample3.jar ConsoleSample3 ConsoleSample3.class | |
5 | +exewrap ConsoleSample3.jar | |
6 | + |
@@ -251,7 +251,7 @@ | ||
251 | 251 | |
252 | 252 | ### exewrap.util |
253 | 253 | |
254 | -$(OBJ)\util.jar : $(OBJ) $(OBJ)\exewrap\util\EventLogHandler.class $(OBJ)\exewrap\util\EventLogStream.class $(OBJ)\exewrap\util\FileLogStream.class $(OBJ)\exewrap\util\UncaughtExceptionHandler.class $(OBJ)\exewrap\util\Environment.class | |
254 | +$(OBJ)\util.jar : $(OBJ) $(OBJ)\exewrap\util\EventLogHandler.class $(OBJ)\exewrap\util\FileLogStream.class $(OBJ)\exewrap\util\UncaughtExceptionHandler.class $(OBJ)\exewrap\util\Environment.class | |
255 | 255 | $(JAR) cvfM $(OBJ)\util.jar -C $(OBJ) exewrap\util |
256 | 256 | |
257 | 257 | $(OBJ)\exewrap\util\Environment.class : $(OBJ) java\exewrap\util\Environment.java |
@@ -260,9 +260,6 @@ | ||
260 | 260 | $(OBJ)\exewrap\util\EventLogHandler.class : $(OBJ) java\exewrap\util\EventLogHandler.java |
261 | 261 | $(JAVAC) -Xlint:none -g:none -source 1.5 -target 1.5 -sourcepath java -d $(OBJ) java\exewrap\util\EventLogHandler.java |
262 | 262 | |
263 | -$(OBJ)\exewrap\util\EventLogStream.class : $(OBJ) java\exewrap\util\EventLogStream.java | |
264 | - $(JAVAC) -Xlint:none -g:none -source 1.5 -target 1.5 -sourcepath java -d $(OBJ) java\exewrap\util\EventLogStream.java | |
265 | - | |
266 | 263 | $(OBJ)\exewrap\util\FileLogStream.class : $(OBJ) java\exewrap\util\FileLogStream.java |
267 | 264 | $(JAVAC) -Xlint:none -g:none -source 1.5 -target 1.5 -sourcepath java -d $(OBJ) java\exewrap\util\FileLogStream.java |
268 | 265 |
@@ -252,7 +252,7 @@ | ||
252 | 252 | { |
253 | 253 | if(ext_flags == NULL || wcsstr(ext_flags, L"NOLOG") == NULL) |
254 | 254 | { |
255 | - wcscat_s(utilities, BUFFER_SIZE, UTIL_EVENT_LOG_STREAM); | |
255 | + wcscat_s(utilities, BUFFER_SIZE, UTIL_FILE_LOG_STREAM); | |
256 | 256 | } |
257 | 257 | wcscat_s(utilities, BUFFER_SIZE, UTIL_EVENT_LOG_HANDLER); |
258 | 258 | } |
@@ -9,7 +9,6 @@ | ||
9 | 9 | #define UTIL_ENCODING_FIX L"ENCODING-FIX;" |
10 | 10 | #define UTIL_UNCAUGHT_EXCEPTION_HANDLER L"UncaughtExceptionHandler;" |
11 | 11 | #define UTIL_FILE_LOG_STREAM L"FileLogStream;" |
12 | -#define UTIL_EVENT_LOG_STREAM L"EventLogStream;" | |
13 | 12 | #define UTIL_EVENT_LOG_HANDLER L"EventLogHandler;" |
14 | 13 | |
15 | 14 | #define LOAD_RESULT_MAX_MESSAGE_LENGTH 32678 |
@@ -98,9 +98,6 @@ | ||
98 | 98 | if(utilities.contains("FileLogStream;")) { |
99 | 99 | Class.forName("exewrap.util.FileLogStream", true, systemClassLoader); |
100 | 100 | } |
101 | - if(utilities.contains("EventLogStream;")) { | |
102 | - Class.forName("exewrap.util.EventLogStream", true, systemClassLoader); | |
103 | - } | |
104 | 101 | if(utilities.contains("EventLogHandler;")) { |
105 | 102 | Class.forName("exewrap.util.EventLogHandler", true, systemClassLoader); |
106 | 103 | } |