Hi Oliver,

it depends, if you would use the new simple bootstrap feature it should work as expected with double clicking the jar file.

The new bootstrap feature search the default office on a computer and starts a new instance if necessary. If an office instance is already running it connects simply to the running office. The connection is established over a named pipe. Your client application jar file needs a special manifest entry and some glue code class files from the SDK.
For more details see the SDK examples and the DevGuide.

Juergen

Oliver Brinzing wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I was playing with a java program, that connects to a running office via remote 
connection ...

the program will be deployed as a *.jar file and it should be possible to start 
it double-clicking
on the jar file ... but this seems not to be possible cause I need the 
juh.jar,jurt.jar, juh.jar,...
files inside the class path ...

First I tried to use a windows *.lnk but the caller string is to long for all 
the class files :-(

So next I used a *.bat file to start the jar:

@setlocal
@set OOPath=D:\Programs\OpenOffice.org2.0\program\classes
@set
OOJars=%OOPath%\juh.jar;%OOPath%\jurt.jar;%OOPath%\jut.jar;%OOPath%\ridl.jar;%OOPath%\unoil.jar;%OOPath%\sandbox.jar
@start /B javaw -cp my_javaprogram.jar;%OOJars% org.test.Main
@endlocal

To avoid the pop up of the command window (for just a second) I created a 
windows *.url.
This is quite easy and the *.url file can be created during an install process, 
using java itself...

[InternetShortcut]
URL=file:///d:/programs/my_program/starter.bat
WorkingDirectory=d:\programs\my_program
IconFile=d:\programs\my_program\my_icon.ico
IconIndex=0
ShowCommand=7

Anyway, I also tried the to use a *.lnk using:

javaw.exe -Djava.ext.dirs="D:\Programs\OpenOffice.org2.0\program\classes" -jar
d:\programs\my_program\my_javaprogram.jar

But this does not work, cause my program uses jaxp and now takes the 
"xercesImpl.jar" from the OO
classpath instead of
the original java 1.5 class files ... this crashes my program with a

  java.lang.AbstractMethodError: org.apache.xerces.dom.

DeferredElementImpl.setUserData(Ljava/lang/String;Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;

As a workaround I could add an external standalone jaxp and use
"-Djava.endorsed.dirs=D:\java\jaxp1.3.endorsed",
but that's not what I really wanted to do ...

Any hints how to simplify this process ?
(I don't want to copy the oo *.jar files into my program folder, or even put 
them unpacked into my
programs *.jar file)

regards

Oliver

- --
GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFDw/5CTiyrQM/QSkURAoW4AKCAJ+iOf8oF4aEQCTizFGxjQc1MwQCglpBe
K9HbX53KW+8MHsEzX9yjm8M=
=hB0H
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to