need a simple example of use of Eclipse.

M

Mr. X.

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 :)
 
I

IchBin

Mr. X. said:
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 :)

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

--
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-)
 
K

kofa

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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top