Launching a rich client in XP

J

John Bailo

I wrote a rich client that accesses a web service, using Eclipse.

The start up command and it's associated libraries is >2k characters, so
I cannot fit it into an XP shortcut.

I wrote a .BAT file, but if I run that way, it leaves a DOS window open.


Is there anyway in Windows to shell a command into the background ( like
the & in linux ) ?

Is there a way in java to embed some of the libraries into a startup
*.cfg (config) file of some sort so the startup line doesn't have to be
so long?


Here's my command:

C:\Sun\AppServer\jdk\bin\javaw.exe
-Djava.library.path=c:/eclipse/plugins/org.eclipse.swt.win32_3.1.0/os/win32/x86
-classpath "C:\Documents and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\classes;C:\Program
Files\Apache Group\Tomcat 4.1\common\lib\activation.jar;C:\Program
Files\Apache Group\Tomcat 4.1\common\lib\ant-launcher.jar;C:\Program
Files\Apache Group\Tomcat 4.1\common\lib\ant.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\commons-collections.jar;C:\Program
Files\Apache Group\Tomcat 4.1\common\lib\commons-dbcp-1.1.jar;C:\Program
Files\Apache Group\Tomcat
4.1\common\lib\commons-logging-api.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\commons-pool-1.1.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\jasper-compiler.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\jasper-runtime.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\jdbc2_0-stdext.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\jndi.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\jta.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\lib\mail.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\lib\naming-common.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\lib\naming-factory.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\lib\naming-resources.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\lib\servlet.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\lib\tools.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\endorsed\xercesImpl.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\endorsed\xmlParserAPIs.jar;C:\Documents and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\axis.jar;C:\Documents
and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\saaj.jar;C:\Documents
and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\commons-logging.jar;C:\Documents
and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\wsdl4j.jar;C:\Documents
and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\jaxrpc.jar;C:\Documents
and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\log4j-1.2.8.jar;C:\Documents
and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\commons-discovery.jar;C:\Documents
and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\webserviceutils.jar;C:\eclipse\plugins\org.eclipse.swt.win32_3.1.0\ws\win32\swt.jar"
org.tempuri.MatchCode20Client
 
O

Oliver Wong

John Bailo said:
I wrote a rich client that accesses a web service, using Eclipse.

The start up command and it's associated libraries is >2k characters, so I
cannot fit it into an XP shortcut.

I wrote a .BAT file, but if I run that way, it leaves a DOS window open.

Have you looked into WindowsShell scripting?

- Oliver
 
R

Roedy Green

Here's my command:

C:\Sun\AppServer\jdk\bin\javaw.exe
-Djava.library.path=c:/eclipse/plugins/org.eclipse.swt.win32_3.1.0/os/win32/x86
-classpath "C:\Documents and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\classes;C:\Program

You could write a "kicker" a small C program that does nothing but
launch your program. You don't then have a command interpreter lying
around or a DOS window.

If you have a lot of this sort of thing, you could write a program to
write kickers, that takes a shell executable written in C or MASM and
inserts the data into it without having to compile them.

Your kicker can embed such things as set environment, system
properties, command line, classpath. Alternatively your kicker could
read such info from a properties file whose name is embedded in the
kicker. The idea is you don't need to specify anything but the
kicker.exe's name The kickers go on the path or are added to the
virtual path in the registry.

see http://mindprod.com/projects/kicker.html

See http://mindprod.com/jgloss/registry.html
 
V

Virgil Green

John said:
I wrote a rich client that accesses a web service, using Eclipse.

The start up command and it's associated libraries is >2k characters,
so I cannot fit it into an XP shortcut.

I wrote a .BAT file, but if I run that way, it leaves a DOS window
open.


Is there anyway in Windows to shell a command into the background (
like the & in linux ) ?

Is there a way in java to embed some of the libraries into a startup
*.cfg (config) file of some sort so the startup line doesn't have to
be so long?


Here's my command:

C:\Sun\AppServer\jdk\bin\javaw.exe
-Djava.library.path=c:/eclipse/plugins/org.eclipse.swt.win32_3.1.0/os/win3 2/x86
-classpath "C:\Documents and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\classes;C:\Program
Files\Apache Group\Tomcat 4.1\common\lib\activation.jar;C:\Program
Files\Apache Group\Tomcat 4.1\common\lib\ant-launcher.jar;C:\Program
Files\Apache Group\Tomcat 4.1\common\lib\ant.jar;C:\Program
Files\Apache Group\Tomcat
4.1\common\lib\commons-collections.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\commons-dbcp-1.1.jar;C:\Program
Files\Apache Group\Tomcat
4.1\common\lib\commons-logging-api.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\commons-pool-1.1.jar;C:\Program
Files\Apache Group\Tomcat
4.1\common\lib\jasper-compiler.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\jasper-runtime.jar;C:\Program
Files\Apache Group\Tomcat
4.1\common\lib\jdbc2_0-stdext.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\jndi.jar;C:\Program Files\Apache
Group\Tomcat 4.1\common\lib\jta.jar;C:\Program Files\Apache
Group\Tomcat
4.1\common\lib\mail.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\lib\naming-common.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\lib\naming-factory.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\lib\naming-resources.jar;C:\Program Files\Apache
Group\Tomcat
4.1\common\lib\servlet.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\lib\tools.jar;C:\Program Files\Apache Group\Tomcat
4.1\common\endorsed\xercesImpl.jar;C:\Program Files\Apache
Group\Tomcat
4.1\common\endorsed\xmlParserAPIs.jar;C:\Documents and
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\axis.jar;C:\Doc
uments
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\saaj.jar;C:\Doc
uments
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\commons-logging
..jar;C:\Documents
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\wsdl4j.jar;C:\D
ocuments
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\jaxrpc.jar;C:\D
ocuments
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\log4j-1.2.8.jar
;C:\Documents
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\commons-discove
ry.jar;C:\Documents
Settings\jbailo\workspace\MatchCode20\WebContent\WEB-INF\lib\webserviceutils
..jar;C:\eclipse\plugins\org.eclipse.swt.win32_3.1.0\ws\win32\swt.jar"
org.tempuri.MatchCode20Client

Put all those jar files in the extension directory and then remove them from
your shortcut command.
 
M

Michael N. Christoff

Why not use an executable jar file? Any computer with a 1.4+ vm can run
them simply by double clicking the jar file.

I've distributed utilities internally for both PC and Mac.

-mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top