Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Running SWT application outside Eclipse
Running SWT application outside Eclipse [message #464564] Thu, 24 November 2005 22:15 Go to next message
Eclipse UserFriend
Originally posted by: mwilli.iastate.edu

I'm trying to create a redistributable jar file for an application I am
working on. The application uses SWT for the grapical interface. I am able
to run the jar file using the java -classpath
swt.jar;helloworld.jar -Djava.library.path="C:\SWT" helloworld command-line
parameters, but when the application starts, I don't get any text on the
buttons, I don't get any text in a list, and I don't get any images or text
on CLabels that are part of a sub-class of composite. The program works fine
within Eclipse. Any ideas of how to get this to work outside of eclipse?
P.S. The library is complete.
Re: Running SWT application outside Eclipse [message #464568 is a reply to message #464564] Fri, 25 November 2005 02:59 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Mike Williams wrote:

> I'm trying to create a redistributable jar file for an application I am
> working on. The application uses SWT for the grapical interface. I am able
> to run the jar file using the java -classpath
> swt.jar;helloworld.jar -Djava.library.path="C:\SWT" helloworld
> command-line parameters, but when the application starts, I don't get any
> text on the buttons, I don't get any text in a list, and I don't get any
> images or text on CLabels that are part of a sub-class of composite. The
> program works fine within Eclipse. Any ideas of how to get this to work
> outside of eclipse? P.S. The library is complete.
you use any i18n text and images from swt plugin, probably
this text/images isn't in swt.jar - you have to find where they are
Re: Running SWT application outside Eclipse [message #464570 is a reply to message #464568] Fri, 25 November 2005 02:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mwilli.iastate.edu

Haris Peco wrote:
> Mike Williams wrote:
>
>> I'm trying to create a redistributable jar file for an application I am
>> working on. The application uses SWT for the grapical interface. I am able
>> to run the jar file using the java -classpath
>> swt.jar;helloworld.jar -Djava.library.path="C:\SWT" helloworld
>> command-line parameters, but when the application starts, I don't get any
>> text on the buttons, I don't get any text in a list, and I don't get any
>> images or text on CLabels that are part of a sub-class of composite. The
>> program works fine within Eclipse. Any ideas of how to get this to work
>> outside of eclipse? P.S. The library is complete.
> you use any i18n text and images from swt plugin, probably
> this text/images isn't in swt.jar - you have to find where they are

I can't even get just text to display on a regular button though. How
could that not be a part of swt.jar? This is on the windows platform by
the way.
Re: Running SWT application outside Eclipse [message #464572 is a reply to message #464570] Fri, 25 November 2005 02:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mwilli.iastate.edu

Mike Williams wrote:
> Haris Peco wrote:
>> Mike Williams wrote:
>>
>>> I'm trying to create a redistributable jar file for an application I am
>>> working on. The application uses SWT for the grapical interface. I am
>>> able
>>> to run the jar file using the java -classpath
>>> swt.jar;helloworld.jar -Djava.library.path="C:\SWT" helloworld
>>> command-line parameters, but when the application starts, I don't get
>>> any
>>> text on the buttons, I don't get any text in a list, and I don't get any
>>> images or text on CLabels that are part of a sub-class of composite. The
>>> program works fine within Eclipse. Any ideas of how to get this to work
>>> outside of eclipse? P.S. The library is complete.
>> you use any i18n text and images from swt plugin, probably
>> this text/images isn't in swt.jar - you have to find where they are
>
> I can't even get just text to display on a regular button though. How
> could that not be a part of swt.jar? This is on the windows platform by
> the way.

Nevermind. I read a post from earlier that solved my problem. Running
with javaw.exe instead of java.exe solved my problem.
Re: Running SWT application outside Eclipse [message #464910 is a reply to message #464572] Thu, 01 December 2005 06:14 Go to previous messageGo to next message
Risto Luukkanen is currently offline Risto LuukkanenFriend
Messages: 13
Registered: July 2009
Junior Member
But the guru-level question still remains: In similar (os version and java version) machines or pcs, on some of them 'java MyClass' brings the texts visible while on some others its necessary to 'javaw MyClass' in order to get the Label and Button texts visible.

Risto
Re: Running SWT application outside Eclipse [message #464929 is a reply to message #464910] Thu, 01 December 2005 15:39 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
What may be happening here is that for java, people have added a manifest
file (see http://eclipse.org/swt/faq.php#xpthemes) but not for javaw. When
they switch from java to javaw they are also switching from using version
6.0 of the common controls dll to version 5.0 (with the manifest files you
actually run a different version of the OS level controls).

It would be useful to know 1) Do you have a manifest? Is it for java or
javaw? 2) What Windows skin are you using? Is it the default Windows XP
Style or have you downloaded something else?

I do not see a bug report entered for this problem. Can someone who is able
to recreate the problem please enter a bug report against Platform SWT?

"Risto Luukkanen" <rluukkanen@hotmail.com> wrote in message
news:15676436.1133417694063.JavaMail.root@cp1.javalobby.org...
> But the guru-level question still remains: In similar (os version and java
> version) machines or pcs, on some of them 'java MyClass' brings the texts
> visible while on some others its necessary to 'javaw MyClass' in order to
> get the Label and Button texts visible.
>
> Risto
Re: Running SWT application outside Eclipse [message #464958 is a reply to message #464929] Fri, 02 December 2005 07:09 Go to previous messageGo to next message
Risto Luukkanen is currently offline Risto LuukkanenFriend
Messages: 13
Registered: July 2009
Junior Member
I'll have to check this, my experience is of three WinXP's and three Win2000's and the result was: In two xp's and one 2000 'java MyClass' brought the Label and Button texts visible and in on xp and two 2000's only 'javaw MyClass' resulted with Label and Button texts on the screen.

The SWT- and Jface-textbooks I have read fail to make any mention of javaw.exe.manifest!

I noticed that for example Azureus does have the manifest.

Risto
Re: Running SWT application outside Eclipse [message #464962 is a reply to message #464958] Fri, 02 December 2005 08:45 Go to previous messageGo to next message
Risto Luukkanen is currently offline Risto LuukkanenFriend
Messages: 13
Registered: July 2009
Junior Member
Is it so that javaw.exe.manifest -- it's lack or existence -- changes the behaviour of 'java MyClass'?

Risto
Re: Running SWT application outside Eclipse [message #465092 is a reply to message #464962] Mon, 05 December 2005 21:51 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
The manifest file affects which version of the Windows Common Controls is
used by SWT to create the native widgets.

"Risto Luukkanen" <rluukkanen@hotmail.com> wrote in message
news:23464183.1133513137442.JavaMail.root@cp1.javalobby.org...
> Is it so that javaw.exe.manifest -- it's lack or existence -- changes the
> behaviour of 'java MyClass'?
>
> Risto
Re: Running SWT application outside Eclipse [message #465204 is a reply to message #465092] Thu, 08 December 2005 06:25 Go to previous message
Risto Luukkanen is currently offline Risto LuukkanenFriend
Messages: 13
Registered: July 2009
Junior Member
The bug report with code example now written.

Do I have any possible way to debug this?

Risto
Previous Topic:"Relative to display" To "Relative to TableItem"
Next Topic:Components' looking
Goto Forum:
  


Current Time: Fri Aug 23 22:03:02 GMT 2019

Powered by FUDForum. Page generated in 0.02311 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top