Hi, Ok. No I tried it and saw my mistake when setting the class path you need to set every jar-File from OO-Installation.
You should use the appended bat-Files to run your application. Another thing which I wouldn't do is installing the swt.dll-Files in C:/windows but leave them in the local directory next to your Starter.jar. Tom PS: You need to rename the .realbat to .bat on your system. Erik Zuehlke schrieb: > Hello Tom, > Quoting Tom Schindl <[EMAIL PROTECTED]>: > >> >> Ok this is completely a different message from the one you showed in >> your last mail. >> > > yes, sorry but i testing in the last night. The result is, thus the > current version. > >>> [Loaded sun.awt.NullComponentPeer from D:\dev-java\jre1.5\lib\rt.jar] >>> Exception in thread "main" java.lang.NoClassDefFoundError: >>> com/sun/star/lang/WrappedTargetException >>> at >>> de.zuehlke_it.sgv.view.ooo.BeanFacade.createBean(BeanFacade.java:76) >>> at >>> de.zuehlke_it.sgv.view.ooo.ControllerOOo.initViewOOo(ControllerOOo.java:36) >>> >>> at de.zuehlke_it.sgv.SGV.main(SGV.java:180) >>> >>> On this point my story was stoppd, i can understand what eclipse make to >>> connect OpenOffic and what i MUST make to integrated (clean) the >>> OpenOffice Bean. >>> >>> Reagards... >>> >> >> I cannot see where you tell SWT to search for its native *.dlls please >> note that when you are running your application inside eclipse Run >> As>SWT-Application Eclipse does the magic for you. If you run it your >> own you need to do the magic your own by telling java where to look for >> the swt.*.dll's needed. >> >> 2 possibilities: >> - put swt-dll's in same directory than you Stater.jar >> - assign -Djava.library.path=%your-swt-dll-path% when starting the >> application > > I think it have nothing with the use from swt to to do, take I the > initialization out of OOeBean, run the application. my SWT .dll is > appropriate for that in of c:\windows the listing and is accordingly > also found. > > Erik > >> >> >> Tom >> >>> >>> >>> >>> --------------------------------------------------------------------- >>> 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] > >
package at.bestsolution;
import java.awt.Frame;
import java.io.IOException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.awt.SWT_AWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import com.sun.star.comp.beans.NoConnectionException;
import com.sun.star.comp.beans.OOoBean;
import com.sun.star.lang.IllegalArgumentException;
import com.sun.star.util.CloseVetoException;
public class TestOOConnection {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Test");
shell.open();
shell.setLayout(new FillLayout());
Composite comp = new Composite(shell,SWT.EMBEDDED);
comp.setLayout(new FillLayout());
Frame frame = SWT_AWT.new_Frame(comp);
frame.setSize(300, 300);
frame.setLocation(0, 0);
OOoBean bean = new OOoBean();
frame.add(bean);
try {
bean.loadFromURL("private:factory/swriter", null);
System.err.println("Loaded");
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (CloseVetoException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoConnectionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}
set CLASSPATH=%CLASSPATH%;%*
@echo off
set TMP_CLASSPATH=%CLASSPATH%
set CLASSPATH=%CLASSPATH%
for %%i in ("C:\Programme\OpenOffice.org 2.0\program\classes\*.jar") do call
".\cpappend.bat" %%i
for %%i in ("C:\Programme\OpenOffice.org 2.0\program\classes\*.jar") do call
".\cpappend.bat" %%i
for %%i in ("*.jar") do call ".\cpappend.bat" %%i
set OO_PATH=%CLASSPATH%
set CLASSPATH=%TMP_CLASSPATH%
java -cp "%OO_PATH%" -Xms24m -Xmx512m at.bestsolution.TestOOConnection %*
signature.asc
Description: OpenPGP digital signature
