• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Eclipse 3.2.2 config for SWT / JFace

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I've almost never build a java application using GUI.
Always did Web Application.

So I'm trying to do my first java SWT / JFace app using Eclipse.

I did find quite a lot of tutorial really helpful but I still have problems configuring my project in Eclipse 3.2.2!

Can some one tell which specific jar in need to include in my project JAVA BUILD PATH in order to be able to run my SWT / JFace properly?
 
Marshal
Posts: 80640
472
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As long as you have the appropriate JRE set up in the Eclipse options, and the compatibility options set up correctly, you oughtn't to need a separate .jar at all.
 
Olivier Cleyman
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know that it is supposed to be quite straightforward....
But it doesn't work for me...

Can you detail me your JRE setup?

I have red somewhere that I needed to include jars in my project java build path.
C:\eclipse-2.1.0\plugins\org.eclipse.jface_2.1.0\jface.jar
C:\eclipse-2.1.0\plugins\org.eclipse.runtime_2.1.0\runtime.jar
C:\eclipse-2.1.0\plugins\org.eclipse.swt.win32_2.1.0\ws\win32\swt.jar
C:\eclipse-2.1.0\plugins\org.eclipse.ui.workbench_2.1.0\workbench.jar
C:\eclipse-2.1.0\plugins\org.eclipse.core.runtime_2.1.0\runtime.jar

The problem is that it is an old version of Eclipse and now the jars don't have the same name anymore.
So I put thoses ones...

\Eclipse\eclipse-SDK-3.2.2-win32\eclipse\plugins\org.eclipse.jface_3.2.2.M20061214-1200.jar
\Eclipse\eclipse-SDK-3.2.2-win32\eclipse\plugins\org.eclipse.swt.win32.win32.x86_3.2.2.v3236.jar
\Eclipse\eclipse-SDK-3.2.2-win32\eclipse\plugins\org.eclipse.swt_3.2.2.v3236b.jar
\Eclipse\eclipse-SDK-3.2.2-win32\eclipse\plugins\org.eclipse.ui.workbench_3.2.2.M20070119-0800.jar
\Eclipse\eclipse-SDK-3.2.2-win32\eclipse\plugins\org.eclipse.core.runtime_3.2.0.v20060603.jar
\Eclipse\eclipse-SDK-3.2.2-win32\eclipse\plugins\org.eclipse.core.runtime.compatibility_3.1.100.v20060603.jar

My classes compiles, but there are problems at runtime.

BTW my installed JRE is JRE1.6.0


Thanks a lot for your help
 
Campbell Ritchie
Marshal
Posts: 80640
472
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Those aren't .jars for your project build path. If anything, they are .jars which underpin Eclipse. If your project compiles at all, that suggests it has all its .jars already.

I would suggest you repeat the download of Eclipse. You don't actually need to install it on Windows, since it is an executable .jar. All I did was to un-zip the downloaded file into an appropriate folder (C:\Program Files\Eclipse\Eclipse_3.2.2 will do nicely), then open the file with Windows Explorer. Find the "eclipse.exe" icon which is round and blue, R-click it and drag it onto your desktop. Then click "copy here" or "make shortcut here." You get an Eclipse icon on the Windows desktop which will start Eclipse when double-clicked.

I think this thread ought to be transferred to the IDEs forum . . .
 
Olivier Cleyman
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hummm

I just freshly installed Eclipse and I do know how to do it!

But if you don't include at least the SWT and JFace related jar in the project classpath it won't compile at all! I mean ma java classes with SWT and JFace code will not compile...the rest is fine of course.

That is why I added them... and that is also what all the tutorial on the subject says...

But in my case, and I don't know why, It will crash at runtime.

Anyway thanks a lot!
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Olivier,
In Eclipse 3.1, I took following steps to configure Java Build Path to use SWT/JFace in one program.

Right click on .java program
select Build Path -> Configure Build Path
click on Libraries tab
click on Add External Jars

Then select 2 plugins:

org.eclipse.swt_3.1.0
org.eclipse.swt_win32.win32.x86_3.1.2

These get added to your libraries and your code should work.

I am looking for a online tutorial on SWL/Jface (not from help in eclipse environment). If you know about it, please let me know.

Thank you.

-Suman
 
Campbell Ritchie
Marshal
Posts: 80640
472
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for my mistake about installation.
 
Olivier Cleyman
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the info!

I don't know why this still doesn't work with
org.eclipse.swt.win32.win32.x86_3.2.2.v3236.jar and
org.eclipse.swt_3.2.2.v3236b.jar

My SWT classes compiles but don't run...
My SWT JFace classes don't compile at all because the above jars don't contain JFace related classes.


For SWT I downloaded swt-3.2.2-win32-win32-x86.zip et install it as a Java project.
Then In my own Project I relate to this SWT project and then it does compile and run....

So SWT is OK now but not JFace....


For the tutorials, I just had a look at
http://www-128.ibm.com/developerworks/opensource/library/os-ecgui1/
http://www.developer.com/java/other/article.php/3330861

But I'm reading Manning SWT/JFace in action.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic