Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2007

Tip: Looking for answers? Try searching our database.

need a simple example of use of Eclipse.

Thread view: 
Mr. X. - 27 Jun 2007 22:16 GMT
Hello,

For a newbie on Eclipse,
(I have Eclipse SDK 3.2.2)
I need a simple example (JOptionPane that show a message) in Eclipse,
please.
How can I compile & run my code.

Thanks :)
IchBin - 28 Jun 2007 00:10 GMT
> Hello,
>
[quoted text clipped - 5 lines]
>
> Thanks :)

Just do a Google search in the newsgroups using JOptionPane as the
search argument.

You can also look at the Java tutorial:
http://java.sun.com/docs/books/tutorial/reallybigindex.html

or look at The Java Developers Almanac:
http://www.exampledepot.com

Signature

Thanks in Advance...          http://weconsulting.org
IchBin, Philadelphia, Pa, USA http://ichbinquotations.weconsulting.org
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

kofa - 28 Jun 2007 07:53 GMT
On Jun 27, 10:16 pm, "Mr. X." <no_spam_please@nospam_please.com>
wrote:
> Hello,
>
[quoted text clipped - 3 lines]
> please.
> How can I compile & run my code.

You've already received answer regarding JOptionPane, here's what to
do in Eclipse:
File -> New -> Project -> Java Project. Type name (e.g. "test"), press
Finish. Shortcut: bluish folder icon with a J on it on the toolbar,
below the menu.
Expand your new project in Package explorer. On the main toolbar, you
have icons for package and class (the latter drops down for interface,
enum etc.). Note: eclipse's visual builder is next to worthless, so
don't use it (avoid "Visual Class"). Create a class, paste your source
code. It's immediately compiled. Inside the editor, right click,
select Run as (also available from the Run menu or the toolbar's play-
button-like Run icon as a drop-down option), select Java application.

Tip: after creating your project, you can go and copy (to the
clipboard) the example source code for JOptionPane you'd found using
Google. Select your project in Package explorer, right click and Paste
(or Edit->Paste, or Ctrl+V). The package structure and Java class will
be created for you. E.g. if you copy this:

package hello;
public class Hello {
    public static void main(String[] p) {
        System.out.println("Hello");
    }
}

and paste it into your project, Eclipse will create the package hello
and Hello.java inside it with the text as shown, then compile the
class so it's ready to run.

HTH,
Kofa
Roedy Green - 28 Jun 2007 15:05 GMT
On Thu, 28 Jun 2007 00:16:08 +0300, "Mr. X."
<no_spam_please@nospam_please.com> wrote, quoted or indirectly quoted
someone who said :

>For a newbie on Eclipse,
>(I have Eclipse SDK 3.2.2)
>I need a simple example (JOptionPane that show a message) in Eclipse,
>please.
>How can I compile & run my code.

for some hints on getting started see
http://mindprod.com/jgloss/eclipse.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Roedy Green - 29 Jun 2007 03:52 GMT
On Thu, 28 Jun 2007 00:16:08 +0300, "Mr. X."
<no_spam_please@nospam_please.com> wrote, quoted or indirectly quoted
someone who said :

>I need a simple example (JOptionPane that show a message) in Eclipse,

see http://mindprod.com/jgloss/joptionpane.html
for a test program.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.