For Programmers: Free Programming Magazines  


Home > Archive > Java Help > August 2006 > I know code, but not the logistics of JAVA, can anyone help?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author I know code, but not the logistics of JAVA, can anyone help?
googlegroups@paul13.com

2006-08-21, 4:08 am

I know a bit about coding (php and asp mostly) so I don't know much
about java logistics. I am having most of this work done for me, but
will tweak the work a bit myself.

I am looking to have a program written for me that will give students
random arithmetic problems, and tell them if they got them right or
not. I would like to be able to give this to my students, and have
them use it on there own computer. I would also like it to look nice,
with nice bid letters and numbers, possible a font around 24 or 36.

I have a few questions...

1) I thought that I would use JAVA so that I could give the program to
any student and they could run it on their computer regardless if it is
a mac or PC. My students won't be running any other systems. Now I am
hearing that a stand alone program will only run if JAVA is installed.
I thought that all PC's and macs came with the ability to run JAVA
programs. Is this wrong?

2) Why would someone want to do this in JAVA 1.5 as opposed to JAVA 2.
Is there an advantage/divantage?

3) I have had some people tell me that this should be an applet as
opposed to a stand alone program or application. Will this make it
easier to have the code run on any computer? Will this help it look
nicer? I am not sure what is what here.

4) is there anything else I should know about JAVA and have a program
such as this written in JAVA?

5) what is the difference between a "console", "window", "GUI" and
"swing" program?

Thanks for the help!!!

Paul Osborne

Andrew Thompson

2006-08-21, 4:08 am

googlegroups@paul13.com wrote:
....
> I have a few questions...
>
> 1) I thought that I would use JAVA so that I could give the program to
> any student and they could run it on their computer regardless if it is
> a mac or PC. My students won't be running any other systems. Now I am
> hearing that a stand alone program will only run if JAVA is installed.
> I thought that all PC's and macs came with the ability to run JAVA
> programs. Is this wrong?


Yes.

1) Windows OS's were being distributed with no Java.
for a time during the Sun/MS legal wranglings, Sun
actually got a court order to stop MS distributing the
MS JVM, and MS refused (or perhaps was also
prevented - I'm a bit hazy on the history) from
distributing the Sun Java Plug-In.

2) It is almost standard for distributors to provide
the Java plug-in along with the basic OS these days,
but it is not universal.

> 2) Why would someone want to do this in JAVA 1.5 as opposed to JAVA 2.
> Is there an advantage/divantage?


'Java 2' AFAIR was effectively Java 1.2+.
Swing was available in both versions.

The real advantage of 1.5 is possibly a few
more (and improved) UI elements, but then,
it sounds that your simple program could
largely by written in Java 1.1.

Java 1.5 provides 'generics', but that provides
nothing of direct interest to the end user, it
simply means that development can be quicker.

> 3) I have had some people tell me that this should be an applet as
> opposed to a stand alone program or application.


They are idiots. Ignore them.

>..Will this make it
> easier to have the code run on any computer?


No.

>..Will this help it look
> nicer?


No. In fact, it is far easier to make a stand alone
application look nicer, since they are easier to
resize, and don't have the (unnecessary) browser
GUI (the menus, buttons, address bar) wrapped
around them.

>..I am not sure what is what here.
>
> 4) is there anything else I should know about JAVA and have a program
> such as this written in JAVA?


JAVA is generally spelt Java. It is not an acronym,
and please don't SHOUT at us.

> 5) what is the difference between a "console", "window", "GUI" and


....umm. I was about to google 'definintion ...' when I realised
you could do that just as easily as me..

> "swing" program?


...But in Java - the AWT component toolkit was
available from Java 1.1+, the other component
toolkit is Swing, introduced in Java 1.2.

(Note: Follow-ups set to c.l.j.help only)

HTH

Andrew T.

Daniel Dyer

2006-08-21, 8:01 am

On Mon, 21 Aug 2006 07:37:15 +0100, Andrew Thompson
<andrewthommo@gmail.com> wrote:

> googlegroups@paul13.com wrote:
> ...
>
> Yes.


For PCs. All Macs come with Java pre-installed.

> 'Java 2' AFAIR was effectively Java 1.2+.
> Swing was available in both versions.
>
> The real advantage of 1.5 is possibly a few
> more (and improved) UI elements, but then,
> it sounds that your simple program could
> largely by written in Java 1.1.
>
> Java 1.5 provides 'generics', but that provides
> nothing of direct interest to the end user, it
> simply means that development can be quicker.


I think the OP may be by the version mess, and thinking that 2.0
is later than 1.5 (not an unreasonable assumption). JDK 1.5 is the
development kit for Java 5.0. All versions of the JDK between 1.2 and
1.4.2 were "Java 2".

>
> They are idiots. Ignore them.


That's a bit harsh. It will at least make it marginally easier for a
clueless user to launch the program. They just have to go to a URL rather
than download and run an application. Java WebStart is another option.

>
> JAVA is generally spelt Java. It is not an acronym,
> and please don't SHOUT at us.


My colleague finds it amusing to ask candidates in interviews "What does
JAVA stand for?", just to see how they react. Of course, it really stands
for Just Another Vague Abstraction.

Dan.


--
Daniel Dyer
http://www.dandyer.co.uk
Tom Cole

2006-08-21, 8:01 am


googlegroups@paul13.com wrote:
> I know a bit about coding (php and asp mostly) so I don't know much
> about java logistics. I am having most of this work done for me, but
> will tweak the work a bit myself.
>
> I am looking to have a program written for me that will give students
> random arithmetic problems, and tell them if they got them right or
> not. I would like to be able to give this to my students, and have
> them use it on there own computer. I would also like it to look nice,
> with nice bid letters and numbers, possible a font around 24 or 36.
>
> I have a few questions...
>
> 1) I thought that I would use JAVA so that I could give the program to
> any student and they could run it on their computer regardless if it is
> a mac or PC. My students won't be running any other systems. Now I am
> hearing that a stand alone program will only run if JAVA is installed.
> I thought that all PC's and macs came with the ability to run JAVA
> programs. Is this wrong?


All current MACs can run Java as it is a big part of their OS. Windows
machines may or may not, depending on the distributor. It is not safe
to assume that a Windows machine can run Java.

>
> 2) Why would someone want to do this in JAVA 1.5 as opposed to JAVA 2.
> Is there an advantage/divantage?


There are a few new things in 1.5 (which BTW is newer than Java 2) but
they are mostly developer improvements. There are some GUI improvements
as well, but nothing groundbreaking.

>
> 3) I have had some people tell me that this should be an applet as
> opposed to a stand alone program or application. Will this make it
> easier to have the code run on any computer? Will this help it look
> nicer? I am not sure what is what here.


I wouldn't recommend that. However, if you really want this to run on
any machine with a web browser, you may consider having the program run
as a web application rather than a desktop application. You gain some
other advantages like not having to install or copy any files to the
client, changes are instantly visible to the end user....It does,
however, give you a web page which may not have as much pizazz as a
desktop application. Although I must say I've seen some people make
some very impressive DHTML/XHTML GUIs.

On top of that, most young people today have spent many more hours
looking/using websites than desktop applications so it may even end up
being more familiar to them.

>
> 4) is there anything else I should know about JAVA and have a program
> such as this written in JAVA?


I think Java is an excellent choice as you have lots of options how to
use it. If the program is coded properly you can use the exact same
core classes to make a web page, a desktop application, an application
that runs on cell phones, etc. I would make certain that the developer
encapsulates all the logic in a bean (or beans). These beans (and your
developer will know what a bean is) can then be rather easily dropped
into any of these types of applications with just a little front-end
tweaking.

>
> 5) what is the difference between a "console", "window", "GUI" and
> "swing" program?


When I think console, I think of old character based applications
(think command lines and c:\ prompts). Although today the term
generally means "gaming systems". GUIs are graphical user interfaces.
If you're using buttons, textfields, etc. instead of just plain text,
you're using a GUI. Swing applications are Java desktop applications
that use Java's own GUI components, rather than relying on th OS to get
them. The advantages are that Swing applications should look the same
on any computer that runs Java 1.2 (Java2) or newer. Before Swing there
was AWT, where Java didn't create the components, instead it asked the
underlying operating system to do it.

>
> Thanks for the help!!!


HTH.
>
> Paul Osborne


Andrew Thompson

2006-08-21, 8:01 am

Daniel Dyer wrote:
> On Mon, 21 Aug 2006 07:37:15 +0100, Andrew Thompson
> <andrewthommo@gmail.com> wrote:


>
> That's a bit harsh. ...


I prefer the term 'direct'. ;-)

>...It will at least make it marginally easier for a
> clueless user to launch the program. They just have to go to a URL rather
> than download and run an application. Java WebStart is another option.


JWS makes applications just as easy as applets (one-click).
( ..and I must admit, it rarely occurs to me that there is any
other way, besides WebStart, to launch applications! )

Andrew T.

Andrew Thompson

2006-08-21, 8:01 am

Tom Cole wrote:
> googlegroups@paul13.com wrote:

....
....[color=darkred]
> ...if you really want this to run on
> any machine with a web browser, you may consider having the program run
> as a web application rather than a desktop application.


Good point.
.....
>
> I think Java is an excellent choice as you have lots of options how to
> use it. If the program is coded properly you can use the exact same
> core classes to make a web page,


Yep.

>.. a desktop application,


Yep.

>..an application that runs on cell phones,


Nope. J2ME ('cell-phone Java') is significanlty different to
J2SE ('standard' core desktop Java), AFAIU.

[ Followups set to c.l.j.help only. ]

Andrew T.

Paul

2006-08-23, 8:02 am


googlegroups@paul13.com wrote:
> I know a bit about coding (php and asp mostly) so I don't know much
> about java logistics. I am having most of this work done for me, but
> will tweak the work a bit myself.
>
> I am looking to have a program written for me that will give students
> random arithmetic problems, and tell them if they got them right or
> not. I would like to be able to give this to my students, and have
> them use it on there own computer. I would also like it to look nice,
> with nice bid letters and numbers, possible a font around 24 or 36.


I'm going to get scathed for this but, here goes.
Since all you want to do is generate "random arithmetic problems", and
you know php/asp, why not just do this as a little web application, and
generate a web page?
Then the students don't need to run any software other than a browser.

Andrew Thompson

2006-08-23, 8:02 am

Paul wrote:
> googlegroups@paul13.com wrote:
>
> I'm going to get scathed for this but, here goes.
> Since all you want to do is generate "random arithmetic problems", and
> you know php/asp, why not just do this as a little web application, and
> generate a web page?
> Then the students don't need to run any software other than a browser.


I think that is a great idea. The original problem description
sounds as though the OP was assuming the students had
an internet connection, and HTML representation offers a
number of advantages (especially in terms of accessibility,
and ease of copying) over presenting the information in an
applet.

( BTW Paul - I'm p*ssed off that I didn't think of that
first, but not enough to 'scathe' you - hope you're not
disappointed.. ;)

Andrew T.

Mark Space

2006-08-23, 10:01 pm

googlegroups@paul13.com wrote:
> I have a few questions...


Random answers below...

>
> 1) I thought that I would use JAVA so that I could give the program to
> any student and they could run it on their computer regardless if it is
> a mac or PC. My students won't be running any other systems. Now I am
> hearing that a stand alone program will only run if JAVA is installed.
> I thought that all PC's and macs came with the ability to run JAVA
> programs. Is this wrong?


As mentioned, Java is not pre-installed on all machines. You may have
to manually download the J2SE on each machine, or ask the students to do it.


>
> 2) Why would someone want to do this in JAVA 1.5 as opposed to JAVA 2.
> Is there an advantage/divantage?


The marketing team at Sun needs help badly.

Java 2 is Java 1.2. Java 5 is Java 1.5. Therefore, Java 2 is quite old
and Java 1.5 is the latest thing. If I was in charge at Sun, bad things
would happen to the person who came up with this numbering scheme.

>
> 3) I have had some people tell me that this should be an applet as
> opposed to a stand alone program or application. Will this make it
> easier to have the code run on any computer? Will this help it look
> nicer? I am not sure what is what here.


I think it's a good idea. Be aware that there are 3 or so ways of
making an "applet," and they are really different.

1. A real applet. Java runs inside a browswer. This will work on
almost any machine, if you code to the correct Java spec (1.1, I think,
which as you now know is quite old. Check the machines your school runs
if you need to get a more recent version supported.)

2. Javascript. Javascript is NOT Java, but a dynamic app could make a
reasonable random number program. Like #1, this runs on the browser and
not on a server.

3. Web app. This is an server based application that runs on one
machine, and people look at on their web browser. Most "real" websites
are built this way, and I think it's a good idea. The down-side is that
you also have to maintain Apache, Tomcat (two web servers) and a large
chuck of hardware too (the server). Might not be best for the
beleaguered educator. Plus you need a functioning network. This is
likely to have a learning curve for you like scaling the outside of the
Empire State Building.

4. Java WebStart. This is a simple way of distributing a regular old
Java program. It's completely separate from any of the above. All it
does is provide a link to your Java program, and then downloads and runs
it. Makes for a nice distribution, but there might be a few things to
maintain for you (but not nearly as bad as #3 above.)

>
> 4) is there anything else I should know about JAVA and have a program
> such as this written in JAVA?


See above. PhP and ASP aren't real programming languages, so watch out.
ASP isn't even ASP, it's Visual Basic (usually). ASP is the objects
and API, but VB is the language. You may wish to consider a basic
programming course for yourself.

>
> 5) what is the difference between a "console", "window", "GUI" and
> "swing" program?


Consoles are traditional applications, developed (mostly) on the famous
Berkeley UNIX systems. The "console" part comes in because that's what
they were written on and for: ASCII consoles with 80 columns by 24 rows
of characters. NO GRAPHICS at all (unless you played Nethack ;)).

Window, GUI and Swing are all equivalent. Window is a generic term for
those little boxes with text and buttons that you see everywhere on
your screen. GUI is "Graphical User Interface." Now-a-days, that means
a window. Swing is Java's API for making windows, and a good choice for
Java.

>
> Thanks for the help!!!
>
> Paul Osborne
>

Lion-O

2006-08-24, 7:02 pm

>>..an application that runs on cell phones,

> Nope. J2ME ('cell-phone Java') is significanlty different to J2SE
> ('standard' core desktop Java), AFAIU.


I disagree. If you have learned Java in such a way where you know how it works
then there is no difference with the actual programming at all. The only thing
which differs from SE is the way you design the program, but the same
difference can be applied to EE programming. However, in the end its still Java
and as such conforms to the Java standards. All it basicly does is utilize
other classes and therefor other methods.

--
Groetjes, Peter

..\\ PGP/GPG key: http://www.catslair.org/pubkey.asc
Oliver Wong

2006-08-29, 10:01 pm


"Mark Space" <markspace@sbcglobal.net> wrote in message
news:Aa7Hg.10850$1f6.3908@newssvr27.news.prodigy.net...
>
> See above. PhP and ASP aren't real programming languages, so watch out.
> ASP isn't even ASP, it's Visual Basic (usually). ASP is the objects and
> API, but VB is the language.


I understand (but don't nescessarily agree with the wording of) your
point on ASP, but I'm not sure how you could consider PHP as not a "real"
programming language. It doesn't have "sublanguages" in the way that ASP
does, and it's Turing complete.

- Oliver

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com