I know code, but not the logistics of JAVA, can anyone help?

G

googlegroups

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/disadvantage?

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
 
A

Andrew Thompson

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/disadvantage?

'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.
 
T

Tom Cole

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/disadvantage?

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.
 
A

Andrew Thompson

Tom said:
(e-mail address removed) wrote: .... ....
...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.
 
P

Paul

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.
 
A

Andrew Thompson

Paul said:
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.
 
M

Mark Space

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/disadvantage?

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.
 
O

Oliver Wong

Mark Space said:
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
 

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,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top