run.bat

来自「用Java/C#开发手机程序及移动应用光盘代码。J2ME核心类及MIDlet类;」· Batch 代码 · 共 44 行

BAT
44
字号
@echo off
rem This file runs the corresponded demo.

if "%OS%" == "Windows_NT" setlocal
set DEMO=JSR172Demo

set PROXY_HOST=
set PROXY_PORT=

if not exist .\%DEMO%.jad (
  echo *** Run this batch file from its location directory only. ***
  goto end
)

if not exist .\%DEMO%.jar (
  echo *** You should build the %DEMO%.jar first. ***
  goto end
)

if "%PROXY_HOST%" == "" (
  echo *** You need to specify a proxy for this demo in run.bat. ***
  goto end
)

if "%PROXY_PORT" == "" (
  echo *** You need to specify a proxy for this demo in run.bat. ***
  goto end
)

rem Enter the common 'bin' directory of WTK.
cd ..\..\..\bin

rem Run a WTK with the specified demo.
emulator -Dcom.sun.midp.io.http.proxy=%PROXY_HOST%:%PROXY_PORT% -Xdescriptor:..\apps\%DEMO%\bin\%DEMO%.jad

rem Return back to 'bin' directory of the demo.
cd ..\apps\%DEMO%\bin

:end
if "%OS%" == "Windows_NT" endlocal

rem do a "pause" always
pause

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?