Can someone please clarify what "modern" Java is for me?

D

dos-man 64

Hello, I have not used Java really at all, ever. It's been a long
time since I even looked at it. I'm just getting a refresher here.

Is it compiled or interpreted?

What is a JFrame and how does this differ from a Frame?? Am I all
right to use Java 1.0 SDK for practicing or do I need a more modern
version?

Is there a book that was made that deals with applications programming
and doesn't spend 90%+ time on applets?

What is J2EE? Sure is a lot of verbiage surrounding this language.

What is the prefered development environment?

I need to get rid of this maximize box in the corner of my AWT
appliation window, any suggestions would be appreciated.

Thanks.
 
M

Mark Space

dos-man 64 said:
Is it compiled or interpreted?
Yes.


What is a JFrame and how does this differ from a Frame?? Am I all


JFrame is Swing and newer, you should prefer JFrame and other components
that start with J to their older AWT components.

right to use Java 1.0 SDK for practicing or do I need a more modern
version?


Definately get a modern SDK. 1.0 is WAY old. See the "development
environment" below.
Is there a book that was made that deals with applications programming
and doesn't spend 90%+ time on applets?


I recommend Learning Java, by O'Reilly. Very good book, minimal
treatment of JEE and Applets. Mostly just plain old Java programming,
most of that is talking about the API, which is where you should start.
The language itself is easy to pick up, with the possible exception of
the thread model.
What is J2EE? Sure is a lot of verbiage surrounding this language.


Special library/framework for programming with a webserver. JEE is like
Fast CGI for Java. Don't worry about it for now unless you're certain
you need to know it.

What is the prefered development environment?

Various. Eclipse and NetBeans are free and very common. I like
NetBeans, never tried Eclipse. There are several people here who will
give you the reverse opinion. Both are just opinions. Use the tool
that makes sense to you.

http://www.netbeans.org/downloads/index.html

Note that NetBeans will also come with the latest SDK. Don't have to
worry about getting the right one separately. Use the download button
on the far right, under the column that says "all".
I need to get rid of this maximize box in the corner of my AWT
appliation window, any suggestions would be appreciated.


Post a SSCCE (short example) and we'll take a look at it. Note that if
you already have an AWT only app, you should probably eschew Swing for
the time being.

http://sscce.org/
 
A

Arne Vajhøj

dos-man 64 said:
Is it compiled or interpreted?

JIT compiled. For the performance critical parts at least.
What is a JFrame and how does this differ from a Frame??

JFrame is Swing and Frame is AWT.
Am I all
right to use Java 1.0 SDK for practicing or do I need a more modern
version?

You need a more modern version. 1.0 is from 1996.

Get latest and greatest at http://java.sun.com/.
Is there a book that was made that deals with applications programming
and doesn't spend 90%+ time on applets?

Applets are not in fashion today so a modern book will only spend
a chapter on applets.
What is J2EE? Sure is a lot of verbiage surrounding this language.

J2EE is now Java EE.

It is "server" Java.
What is the prefered development environment?

Eclipse and NetBeans are the two most popular IDE's today. And
both are free, so try them before you decide which one is
for you.

Arne
 
D

dos-man 64

Is there a book that was made that deals with applications programming
I recommend Learning Java, by O'Reilly.  Very good book, minimal
treatment of JEE and Applets.  Mostly just plain old Java programming,
most of that is talking about the API, which is where you should start.
  The language itself is easy to pick up, with the possible exception of
the thread model.

Ok, cool. I will order that one. I have here Java primer plus, java
unleashed, Java api reference, and java 2 in 21 days. Most of these
are saturated with applets programming.
Various.  Eclipse and NetBeans are free and very common.  I like
NetBeans, never tried Eclipse.  There are several people here who will
give you the reverse opinion.  Both are just opinions.  Use the tool
that makes sense to you.

http://www.netbeans.org/downloads/index.html

Note that NetBeans will also come with the latest SDK.  Don't have to
worry about getting the right one separately.  Use the download button
on the far right, under the column that says "all".

Cool. I will try out netbeans then.
Post a SSCCE (short example) and we'll take a look at it. Note that if
you already have an AWT only app, you should probably eschew Swing for
the time being.

http://sscce.org/


Well, here is my "app" right now. All it is is an empty window with
no controls on it (although it took quite a few hours to make it.) I'm
just trying to get the basics down, ie create a window, move it, set
the caption, add a menu, etc.


/*
sample java program,
1. creates a basic form
2. sets the caption
3. resizes it
4. places some menus on it
5. paints it to COLOR_BTNFACE
6. traps the escape key
7. moves it to center of the screen
*/

import java.awt.*;
import java.io.*;
import java.lang.*;

class Form extends java.awt.Frame
{
Panel buttonpanel;
Form()
{
Color brush = new Color(212,208,200); // COLOR_BTNFACE RGB()
setBackground(brush);
MenuBar mbar = new MenuBar();
setMenuBar(mbar);
move(200,150);

Menu mnuFile = new Menu("File");
mbar.add(mnuFile);
mnuFile.add(new MenuItem("Open"));

Menu mnuEdit = new Menu("Edit");
mbar.add(mnuEdit);
mnuEdit.disable();

Menu mnuHelp = new Menu("Help");
mbar.add(mnuHelp);
mnuHelp.add(new MenuItem("About"));
}

public boolean handleEvent(Event E)
{
if (E.id==Event.KEY_PRESS) // page 341 of java 2 book
{
if(E.key==27)
System.exit(0);
}

if (E.id==Event.WINDOW_DESTROY)
{
System.exit(0);
}

return(false);
}
}

class first
{
public static void main (String args[])
{
Form Form1 = new Form();
Form1.setTitle("hello");
Form1.resize(250,200);

Form1.show();
}
}
 
J

Joshua Cranmer

dos-man 64 said:
Is it compiled or interpreted?

It's compiled to a bytecode which is subsequently either interpreted or
further (JIT) compiled to machine code. So, both.
What is a JFrame and how does this differ from a Frame?? Am I all
right to use Java 1.0 SDK for practicing or do I need a more modern
version?

JFrame == Swing, which is a lightweight toolkit system.
Frame == AWT, which is heavyweight.

And please use Java 6. You get many more features, such as much better
concurrent programming utilities, a sane event system, the collections
libraries, not to mention all the new compiler features + etc.
Is there a book that was made that deals with applications programming
and doesn't spend 90%+ time on applets?

Most books I know of don't dwell on Applets.
What is J2EE? Sure is a lot of verbiage surrounding this language.

Enterprise Edition. You should probably stick with the Standard Edition.
What is the prefered development environment?

NetBeans and Eclipse are the most common Java IDEs; there are dozens of
others as well.
I need to get rid of this maximize box in the corner of my AWT
appliation window, any suggestions would be appreciated.

You may have to go to dialog boxes to get rid of it.
 
D

dos-man 64

It's compiled to a bytecode which is subsequently either interpreted or
further (JIT) compiled to machine code. So, both.


The java.exe program is the interpreter correct? Then the program for
machine code is JIT.exe?

JFrame == Swing, which is a lightweight toolkit system.
Frame == AWT, which is heavyweight.

And please use Java 6. You get many more features, such as much better
concurrent programming utilities, a sane event system, the collections
libraries, not to mention all the new compiler features + etc.


I am going to try it out. I bought my first java book must have been
10 years ago (java primer plus.) I hate to say it, but I'm no better
with it now than I was then. Fortunately, there are other
languages :D

Enterprise Edition. You should probably stick with the Standard Edition.


I have here on CD Microsoft Visual J++ professional edition. Paid like
$15 for it. Is this worth anything, or should I just toss it??

NetBeans and Eclipse are the most common Java IDEs; there are dozens of
others as well.


You may have to go to dialog boxes to get rid of it.


From what I can tell, I can only create a dialog box if I also create
a frame. Should I hide the frame? For some reason, I like to write
small utility apps that use the dialog style.

dos-man
 
A

Arne Vajhøj

dos-man 64 said:
The java.exe program is the interpreter correct? Then the program for
machine code is JIT.exe?

No.

java.exe runs the JVM. The JVM interprets and JIT compile as
it considers it optimal.

Arne
 
A

Alan Morgan

Ok, cool. I will order that one. I have here Java primer plus, java
unleashed, Java api reference, and java 2 in 21 days. Most of these
are saturated with applets programming.

A good rule of thumb is that if the book title contains the word
"Unleashed" or is of the form "Learn <thing> in <number> <unit of time>"
then it should be avoided.

I happen to like Core Java (get the later edition that covers the newest
incarnation of the language). There is some applet stuff, but not much.

Alan
 
D

dos-man 64

Ok, cool.  I will order that one.  I have here Java primer plus, java
unleashed, Java api reference, and java 2 in 21 days.  Most of these
are saturated with applets programming.

A good rule of thumb is that if the book title contains the word
"Unleashed" or is of the form "Learn <thing> in <number> <unit of time>"
then it should be avoided.

I happen to like Core Java (get the later edition that covers the newest
incarnation of the language).  There is some applet stuff, but not much..

Alan[/QUOTE]


I have just recently finished a graphics editor in vb. I am calling
it Torrent. Torrent spits out vb 5 source code while you draw your
image. You can then recreate your image in code without needing the
actual bitmap image. I feel like this could be useful to java game
programmers (then again, maybe not.) The only problem is I don't know
java well enough to make torrent spit out java code.

Well, here is a demo version of the program if you want to see what it
is like. It isn't a particularly killer image editor or anything, but
it is quite unconventional.

http://www.yousendit.com/transfer.php?action=batch_status&batch_id=dVlyUWV1ZDVlcEpMWEE9PQ
 
A

Andrew Thompson

I have here on CD Microsoft Visual J++ professional edition. Paid like
$15 for it.  Is this worth anything, or should I just toss it??

Just toss it out. Neither Netbeans nor Eclipse
costs any more than the bytes need to download them.
And anything MS based is not truly 'Java compatible'
(There was a bit of a thing where Sun sued MS over
their non-compliant runtime - and won!)

frame.setResizable(false)
// or, more drastic
frame.setUndecorated(true);

As a general point though, I think someone who
is learning will have better luck with Swing,
if only for the fact that so many who used AWT
in the past have forgotten the details, and cannot
adequately help with AWT problems.

(And just quickly on your hunt for books without
applets. I regard any Java book that shows a tendency
towards applets to be *very* suspect, and recommend
avoiding them at any cost.)
 
J

Joshua Cranmer

dos-man 64 said:
The java.exe program is the interpreter correct? Then the program for
machine code is JIT.exe?

The java.exe is the entire VM [1]. This includes the JIT compiler and
the optimizer in there as well as the bytecode intepreter. It also
happens to include such useful features as garbage collectors--three of
them, I'm told--as well as other features.
I am going to try it out. I bought my first java book must have been
10 years ago (java primer plus.) I hate to say it, but I'm no better
with it now than I was then. Fortunately, there are other
languages :D

There are Sun's tutorials, which are relatively good introductions.
I have here on CD Microsoft Visual J++ professional edition. Paid like
$15 for it. Is this worth anything, or should I just toss it??

J++ is not actual Java (to my knowledge), and if it is, it's not a
recent version of Java, so it's pretty much worthless.
 
A

Arne Vajhøj

Joshua said:
J++ is not actual Java (to my knowledge), and if it is, it's not a
recent version of Java, so it's pretty much worthless.

As I understand it then:

J++ = Java 1.1.4 - RMI - JNI + COM

That is approx. worthless.

Arne
 
A

Andrew Thompson

As I understand it then:

J++ = Java 1.1.4 - RMI - JNI + COM

Was the MSVM also lacking RMI/JNI*? I had always
believed that the MSVM was only non-compliant in
the addition of the MS specific classes, but was
otherwise a 'complete 1.1'. (* I have never had
the need to use JNI or RMI, so I am not sure about
their inclusion or absence from a JRE.)
That is approx. worthless.

Agreed.
 
A

Arne Vajhøj

Andrew said:
Was the MSVM also lacking RMI/JNI*? I had always
believed that the MSVM was only non-compliant in
the addition of the MS specific classes, but was
otherwise a 'complete 1.1'. (* I have never had
the need to use JNI or RMI, so I am not sure about
their inclusion or absence from a JRE.)

I am pretty sure that SUN sued because of what was
missing not because of what was added.

If they had only added then it would be able to pass
a TCK test (even though I think this was before TCK).

http://www.microsoft.com/presspass/legal/charles.mspx

"We decided not to support Sun's native interface ("JNI") and not to
include Sun's Remote Method Invocation package ("RMI"). We have been
very clear with developers and other customers that we do not include
these aspects of Sun's JDK 1.1."

Arne
 
A

Andrew Thompson

...
I am pretty sure that SUN sued because of what was
missing not because of what was added.

The MS specific classes did cause problems. They both
introduced new security bugs, and made any code developed
to use them, 'IE specific'. I almost bet that whatever
IDE MS offered for Java, had the MS GUI widgets 'drag and
dropable' on an Applet.

Thanks for the further info. on JNI/RMI. The lack of
core classes is a serious deficiency, and is enough
(IMO) to justify any legal action.
 
J

Joshua Cranmer

Joshua said:
dos-man 64 said:
The java.exe program is the interpreter correct? Then the program for
machine code is JIT.exe?

The java.exe is the entire VM [1].

[1] Actually, java.exe is a wrapper around jvm.dll, which is where all
the VM stuff actually is (and the other shared libraries in similar
directories, like good old awt.dll, etc.). All of the other programs are
pretty much the same wrappers except the main class is changed.
 
D

dos-man 64

The MS specific classes did cause problems.  They both
introduced new security bugs, and made any code developed
to use them, 'IE specific'.  I almost bet that whatever
IDE MS offered for Java, had the MS GUI widgets 'drag and
dropable' on an Applet.


Well, I had heard that MS had reverse engineered everything, to figure
out how it all worked. This allowed them to create their own version.

Thanks for the further info. on JNI/RMI.  The lack of
core classes is a serious deficiency, and is enough
(IMO) to justify any legal action.


The only problem is that MS has so much money (and is so used to being
sued), that even this would not disuade them. They probably expected
to be sued and went ahead and did it anyway. I don't dislike MS as
much as some (actually many), but I'm not really keen on them anymore
either. I'll leave it that. Actually, I'm due for my monthly MS rant,
but I'll hold off on that. I'm saving it for the end of the month.
 
R

Roedy Green

Hello, I have not used Java really at all, ever. It's been a long
time since I even looked at it. I'm just getting a refresher here.

Is it compiled or interpreted?

both. See http://mindprod.com/jgloss/hotspot.html
http://mindprod.com/jgloss/nativecompiler.html
What is a JFrame and how does this differ from a Frame?? Am I all
right to use Java 1.0 SDK for practicing or do I need a more modern
version?
JFrame is for containing Swing components, Frame for AWT components.

See http://mindprod.com/jgloss/awt.html
http://mindprod.com/jgloss/swing.html
http://mindprod.com/jgloss/frame.html
http://mindprod.com/jgloss/jframe.html
Is there a book that was made that deals with applications programming
and doesn't spend 90%+ time on applets?

Almost everything you can say about Applets applies to applications.
Perhaps you mean books about non-gui programming?
What is J2EE? Sure is a lot of verbiage surrounding this language.

see http://mindprod.com/jgloss/j2ee.html
What is the prefered development environment?

That is like asking the "the preferred car", or "the preferred porn
queen". Try them. See http://mindprod.com/jgloss/ide.html
for the possibilities.

I need to get rid of this maximize box in the corner of my AWT
appliation window, any suggestions would be appreciated.

See http://mindprod.com/jgloss/frame.html
--
Roedy Green Canadian Mind Products
http://mindprod.com

"It wasn’t the Exxon Valdez captain’s driving that caused the Alaskan oil spill. It was yours."
~ Greenpeace advertisement New York Times 1990-02-25
 
W

Wojtek

dos-man 64 wrote :
I have just recently finished a graphics editor in vb. I am calling
it Torrent. Torrent spits out vb 5 source code while you draw your
image. You can then recreate your image in code without needing the
actual bitmap image. I feel like this could be useful to java game
programmers (then again, maybe not.) The only problem is I don't know
java well enough to make torrent spit out java code.

Hmmm, the name torrent is already associated with a distributed file
transfer process.

I think you would be better off having your program generate a data
file which contians the commands to reproduce the image, rather than
actual source code. Then you write a plugin which reads the data file
and generates the image.

That way (if it ever becomes popular) others could write plugins in
other languages to read the data file.
 

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,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top