Archive: javaw.exe launcher for -jar mucommander.jar Portable


javaw.exe launcher for -jar mucommander.jar Portable
God Bless Your

I try (I am not speak good english) to make a lancher for my mucommander portable wiht NSIS, but I don´t can run it.

With mucommander you can see always the virus in Pendrives, and it is more important in the moment to do reparis for a Computer.

I run mucommander Portable from de Command Line (cmd.exe) with a *.bat file that are inside of the next file:


(http://www.mucommander.com/download/...ortable.tar.gz)

This said this:

*******************************************************************************************************

@echo off
echo.
echo -------------------------
echo - Launching muCommander -
echo -------------------------
echo.

if "%JAVA_HOME%"=="" goto nojavahome
echo Found a Java runtime in %JAVA_HOME%
start "%JAVA_HOME%\bin\javaw.exe -jar" mucommander.jar
goto exit

:nojavahome
echo JAVA_HOME environment variable not set, trying default javaw.exe
start javaw -jar mucommander.jar -p $0/../.mucommander %1% %2% %3% %4% %5% %6% %7% %8% %9%
goto exit

:exit
exit

**********************************************************************************************************

Please read the next text:


"Testing Java Launcher example, I noticed it calls the JRE's "java.exe". The problem with "java.exe" is that it will always open a command window (which must stay open for the whole execution of the child Java process - if the user accidentally closes the command window the child process dies too). So, I thought it would be better to use "javaw.exe". It will open your java application directly as a normal Windows application. "


For *.bat is:

Javaw.exe –jar mucommander.jar

For *.exe:

????????????(I don´t know)



Please see this:

(http://nsis.sourceforge.net/A_slight..._Java_Launcher)

For this reason I try to do a .exe launcher with NSIS to open cucommander Portable, but because mucommander Portable not working in some Computers for have disable the comand line (cmd.exe).

There said (for the midle):

**********************************************************************
;You want to change the next two lines too
!define CLASSPATH ".;lib;lib\myJar"
!define CLASS "org.me.myProgram"

Section ""
Call GetJRE
Pop $R0

; change for your purpose (-jar etc.)
;Example: StrCpy $0 '"$R0" -classpath "${CLASSPATH}" ${CLASS}'

SetOutPath $EXEDIR
ExecWait $0
SectionEnd
***********************************************************************


I tyr to put:

********************************************************
; !define CLASSPATH "bin\mucommander.jar"
; !define CLASS "org.me.myProgram"

Section ""
Call GetJRE
Pop $R0

; change for your purpose (-jar etc.)
;WAcho StrCpy $0 '"$R0" -classpath "${CLASSPATH}" ${CLASS}'
StrCpy $0 '"$R0" -jar mucommander.jar'

SetOutPath $EXEDIR
ExecWait $0
SectionEnd
*********************************************************

But not working.

Also I Try:

*******************************************************
!define CLASSPATH "bin\mucommander.jar"
; !define CLASS "org.me.myProgram"

Section ""
Call GetJRE
Pop $R0

; change for your purpose (-jar etc.)
StrCpy $0 '"$R0" -jar "${CLASSPATH}"'

SetOutPath $EXEDIR
ExecWait $0
SectionEnd
*******************************************************

But not working

Alto I Try:

****************************************************
!define CLASSPATH "bin\mucommander.jar"
; !define CLASS "org.me.myProgram"

Section ""
Call GetJRE
Pop $R0

; change for your purpose (-jar etc.)
StrCpy $0 '"$R0" -jar'

SetOutPath $EXEDIR
ExecWait $0
SectionEnd
****************************************************

But not working, help me please.


Re: javaw.exe launcher for -jar mucommander.jar Portable

Originally posted by wachin_id (removed commented lines)
*****************************************************
Section ""
Call GetJRE
Pop $R0

StrCpy $0 '"$R0" -jar mucommander.jar'

SetOutPath $EXEDIR
ExecWait $0
SectionEnd
*****************************************************
But not working.
Since the mucommander.jar file is located in the bin subfolder, you should use
SetOutPath $EXEDIR\bin