[jboss-user] [Beginners Corner] - Re: Load Library problem
tgcosta
do-not-reply at jboss.com
Fri Jul 4 16:35:44 EDT 2008
Hi PeterJ
So, i didn't wrote the code to start JBossAS. I have an JBossService.exe and a file that call this. Here is the code that i use:
@echo off
setlocal
set Nome=%~n0
set DirIns=%~dp0
set DirJB=C:\jboss-4.2.2.GA
set DirJBS=%DirJB%\_service
set ArqExe=%DirJBS%\JBossService.exe
set JVM=%JAVA_HOME%\jre\bin\server\jvm.dll
if not "%DirIns%"=="%DirJBS%\" (
echo.
echo %Nome% ERRO: Current Directory Invalid!
echo.
echo Precisa ser %DirJBS%
echo.
pause
exit /b
)
if not exist %ArqExe% (
echo.
echo %Nome% ERRO: File not find!
echo.
echo %ArqExe%
echo.
pause
exit /b
)
if "%JAVA_HOME%"=="" (
echo.
echo %Nome% ERRO: Enviroment Variable JAVA_HOME isn't ok!
echo.
pause
exit /b
)
if not exist %JVM% (
echo.
echo %Nome% ERRO: JVM not found!
echo.
echo %JVM%
echo.
pause
exit /b
)
echo -------------------------------------------------------------------------------
echo JVM DO JBoss1 Configuration
echo.
echo Automatic Configuration for JVM (Machine Memory Virtual Java)
echo.
echo.
set /p vm_min="Choose VM min: [Padrao=128] "
set /p vm_max="Choose VM max: [Padrao=512] "
if "%vm_min%"=="" (
set vm_min=128
)
if "%vm_max%"=="" (
set vm_max=512
)
set vm_min=-Xms%vm_min%m
set vm_max=-Xmx%vm_max%m
echo.
echo Installing Service JBoss1...
%ArqExe% -uninstall JBoss1 > nul
%ArqExe% -install JBoss1 %JVM% -Djava.class.path=%JAVA_HOME%\lib\tools.jar;%DirJB%\bin\run.jar %vm_min% %vm_max% -start org.jboss.Main -params -cdefault1 -stop org.jboss.Main -method systemExit -out %DirJBS%\stdout1.log -err %DirJBS%\stderr1.log -current %DirJB%\bin -manual
set vm_min=
set vm_max=
echo.
echo %Nome%: Ok
echo.
pause
echo.
echo.
echo Installation succeeded!
echo.
echo.
pause
I tried to use a JBoss Native, but occurred the same problem. I think the main problem is with LoadLibrary for x64 system....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4162624#4162624
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4162624
More information about the jboss-user
mailing list