newbie

J

JB

Hello all,

I have been programming in .NET for a number of years now and I would
to take start experiment with java. To this end I have downloaded
eclipse, but I cannot seem to figure out how to use it. I am
initially interested in writing applications for desktops and PDAs,
can anyone recommend suitable books or online resources for learning
Java and Eclipse, especially useful if it is done from the perspective
of someone coming from a .NET environment.

Alternatively if there is a preferred IDE to Eclipse that, would also
be useful, although at this stage at least I do not want to pay for
anything.

As I say my initial desire is to develop desktop/PDA applications
rather than web based applications.

Thanks.
 
I

Ian Wilson

JB said:
Hello all,

I have been programming in .NET for a number of years now and I would
to take start experiment with java. To this end I have downloaded
eclipse, but I cannot seem to figure out how to use it.

Google is your friend, "Eclipse java project tutorial" gets you
https://eclipse-tutorial.dev.java.net/eclipse-tutorial/part1.html
Which looks good to me.

I am
initially interested in writing applications for desktops and PDAs,
can anyone recommend suitable books or online resources for learning
Java and Eclipse,
http://java.sun.com/docs/books/tutorial/


especially useful if it is done from the perspective
of someone coming from a .NET environment.

Depending on what you mean by .NET, these may be of help:
http://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java
http://www.harding.edu/fmccown/java1_5_csharp_comparison.html

Alternatively if there is a preferred IDE to Eclipse that, would also
be useful, although at this stage at least I do not want to pay for
anything.

NetBeans is free from Sun. But I suggest you give Eclipse some more time
and effort before you give up on it.

As I say my initial desire is to develop desktop/PDA applications
rather than web based applications.

I recommend you use Java Standard Edition (JSE) to start with. Use Swing
components to create the desktop GUI.

I've not developed for PDAs, it needs a different edition of Java. I
suggest you create at least a few simple desktop apps before progressing
to PDAs.
 
L

Lew

Ian said:

All kinds of tutorials come from them:
<http://java.sun.com/docs/books/tutorial/reallybigindex.html>

Ian said:
NetBeans is free from Sun. But I suggest you give Eclipse some more time
and effort before you give up on it.

I like NetBeans www.netbeans.org myself, but there are many others. I'm also
partial to emacs.
I recommend you use Java Standard Edition (JSE) to start with. Use Swing
components to create the desktop GUI.

I've not developed for PDAs, it needs a different edition of Java. I
suggest you create at least a few simple desktop apps before progressing
to PDAs.

I'd suggest further that you start with console apps - no GUI - until you get
the hang of Java as a language and environment. There are lots of tricks and
traps in the GUI world that'll break your heart if you're still trying to
correlate directories to packages.

Once you can compile apps by hand there's Ant, ant.apache.org, that is a
must-have for Java development.

IBM is a good source for things Java -
http://www.ibm.com/developerworks/java
..
 
A

Andrew Thompson

JB wrote:
...
I have been programming in .NET ...
...
(..will try Java..)
...I do not want to pay for anything.

I think Ian and Lew have covered most of the technical
aspects of what you asked. I just wanted to chime in
to add that there are so many free tools for Java development
that (usually) if someone were to mention a tool that actually
costs money, they would specifically mention* that.

* Then spend the next five paragraphs justifying why
their recommended tool is *so* good that the makers
dare to actually ask money for it.

I imagine it is a very different situation, to developing
using .NET. ;-)

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200706/1
 
J

JB

Thanks for all the advice, it is very useful, actually there is the
free Express edition for .NET now adays, but I agree with you in that
generally I default to assuming that something must be payed for
rather than free.

Anyway, I will start with a console app as you Lew suggests, I have
found a book here on Java that also starts with console type apps and
I will just work my way through it.

I may be being naive here, but it appears that there is no GUI
designer in Eclipse allowing me to drag and drop controls onto a blank
form, am I right in this, is it a requirement to create all controls
manually in code? (I am not complaining here, just trying to
understand).

Also from the reading I have done so far, it seems I have to use a
command line to launch a java app ->java MyApp.jar for example, is
this also true or is it possible to create a normal executable.

Thanks.
 
A

Andrew Thompson

JB wrote:
...
I may be being naive here, but it appears that there is no GUI
designer in Eclipse allowing me to drag and drop controls onto a blank
form,

AFAIU there are plug-ins available for Eclipse.
NetBeans has 'Matisse'.
..am I right in this, is it a requirement to create all controls
manually in code? (I am not complaining here, just trying to
understand).

D'n'D' GUI designers do not work nearly as well with
Java as they perhaps do with .NET. The reason is
because Java compopnents might be rendered on any
number of OS's, with any number of default font sizes,
across different Java versions and PLAF's (pluggable
look and feel), the 'put it here' style designers will often
result in overlapping components* on other machines.

* Or any number of other problems.

Instead, Java has a number of layouts designed to
arrange components in ..
- grids over a container,
- around the borders of a container, or
- flowing from left to right, top to bottom
(as a few examples) that are combined to organise
the GUI and ensure that it is the right size for any
set of desktop constraints.

These layouts do not lend themselves as well to the
D'n'D 'put the component here' style GUI desingers.

(I speak as someone who does not use the
D'n'D style layout designers, and feels they
are rather limiting and kludgy - others swear
by them.)
 
M

Mark Space

Andrew said:
(I speak as someone who does not use the
D'n'D style layout designers, and feels they
are rather limiting and kludgy - others swear
by them.)

I'm a swear by them person. Matisse is great; it uses the Spring layout
manager which does not have the problems Andrew mentions. All
components are positioned relative to each other. A change in size in
one means the rest are moved logically so they maintain distance and
layout alignment. Top level components are resized appropriately so
that all their sub-components fit.

(Note I don't have nearly Andrew's level of experience, but so far there
are no issues for me with Matisse, given some moderately complex GUI's.)

Eclipse is good but NetBeans is worth knowing also. It handles desktop
apps just fine, and comes with Matisse by default. All you need is the
J2SE JDK and NetBeans and you can jump right in. Matisse is no longer a
"plug in" that you need to download separately. (It still is a plug-in
but it's already "in" by default, if you see my meaning.)
 
J

JB

Thanks all, I have already started working my way through the book and
so far I like what I see.
 
J

JB

It's an old Teach yourself Java 2 in an unfeasibly short time by SAMS
that I found lying around (published 7 or 8 years ago so don't know
have valid it is anymore, but it seems to be working so far. I figure
I will go through that and see what happens after that.

I've also found an O'Reilly Java Cookbook (also published a while
ago), but I haven't looked through this yet.

Do you have any other recommendations?

Also, I can't seem to make an .exe file from a Java application, I
have to use java MyApp.class from the command line. I am assuming
making an exe possible, can you tell me how this is done?
 
A

Andrew Thompson

JB said:
It's an old Teach yourself Java 2 in an unfeasibly short time by SAMS
that I found lying around (published 7 or 8 years ago so don't know
have valid it is anymore, but it seems to be working so far.

There are a number of new things intorduced, such as
Generics, but that book should give a reasonable overview
of most of the keywords and language constructs.
...I figure
I will go through that and see what happens after that.

Try to keep a late model JavaDocs handy, you might be
hitting deprecation errors in some classes and methods
(hopefully not too many).
Do you have any other recommendations?

The Java Tutorial - free, (relatively) up to date, direct
from the horses mouth. It can be browsed online, or
downloaded for local viewing (If you specifically
requested books earlier - my apologies).
Also, I can't seem to make an .exe file from a Java application, I
have to use java MyApp.class from the command line.

By collecting the classes in a Jar file, you can add
a manifest that specifies the main class. When a
Jar with manifest is double clicked, it will open and
run.

Further, you can launch/install Jars using web start.
Web start can specify things like download strategy
(for automatically updating the application), icons
(for desktop shortcuts and menu items) file associations..
..I am assuming making an exe possible, ..

Possible yes - a good idea, no.
<http://www.physci.org/codes/javafaq.html#exe>

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200706/1
 
L

Lew

JB said:
I think I am getting a better overall understanding here.

Thanks for all the help.

Don't let old books train you to use the Vector and Hashtable classes. Use
ArrayList and HashMap instead.
 
M

Mark Space

JB said:
It's an old Teach yourself Java 2 in an unfeasibly short time by SAMS

Eww. Get something newer. I've been using O'Reily _Learning Java_ 3rd
edition. It's a huge tome but still can't cover everything. But
between that and Sun's online tutorial, you can definitely learn 90% or
so of what you need to know.

Also, I can't seem to make an .exe file from a Java application, I
have to use java MyApp.class from the command line. I am assuming
making an exe possible, can you tell me how this is done?

No can do, boss. Remember that Java runs everywhere, not just Windows.
So .exe files have no meaning really on Sun, Linux, *BSD, etc.

It should be possible to configure your Windows box to run .jar and
..jnlp files just like .exe files. Java 1.6 installer did this for me, I
think, so I'm not sure of the details. It would be good for both of us
to learn them eventually, I guess.
 
G

Guest

Andrew said:
JB wrote:
..
..
(..will try Java..)


I think Ian and Lew have covered most of the technical
aspects of what you asked. I just wanted to chime in
to add that there are so many free tools for Java development
that (usually) if someone were to mention a tool that actually
costs money, they would specifically mention* that.

* Then spend the next five paragraphs justifying why
their recommended tool is *so* good that the makers
dare to actually ask money for it.

I imagine it is a very different situation, to developing
using .NET. ;-)

Actually there are a lot of free stuff available for .NET
including a lot of JFoobar ports to NFoobar.

Arne
 

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,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top