problem compiling and executing

i just got the Java SE Development Kit (JDK) version 5.0 update 8 and am trying to compile one file as well as run an already compiled class. i have moved the javac file and both java files into the directory where the program to be compiled is, and before i tried to run the already-compiled program i set the classpath to its folder, tho i did this from the file java was originally in before i moved it. the file everything is in now is c:\My Documents\my stuff. A1 is the non-compiled file and TicTacToe is the class i'm trying to run.

Command Prompt:

C:\My Documents\my stuff\jdk1.5.0_08\launcher>set CLASSPATH=C:\My Documents\my stuff\jdk1.5.0_08\demo\applets\TicTacToe

C:\My Documents\my stuff\jdk1.5.0_08\launcher>java TicTacToe.class

Exception in thread "main" java.lang.NoClassDefFoundError: TicTacToe/class

C:\My Documents\my stuff\jdk1.5.0_08\launcher>cd c:\My Documents\my stuff

"this i believe is when i moved the files"

C:\My Documents\my stuff>javac A1.java

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main

these are the source codes for the given files:

A1:

// Test 1

public class A1

{

public static void main(String{}args)

{

System.out.println("Hello");

System.out.println("World.");

}

}

oops, looks like i found a mistake already. those should b brackets between the string and the args. but that still doesn't explain the other one. here it is.

TicTacToe:

/*

* @(#)TicTacToe.java1.10 04/07/26

*

* Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.

*

* Redistribution and use in source and binary forms, with or without

* modification, are permitted provided that the following conditions are met:

*

* -Redistribution of source code must retain the above copyright notice, this

* list of conditions and the following disclaimer.

*

* -Redistribution in binary form must reproduce the above copyright notice,

* this list of conditions and the following disclaimer in the documentation

* and/or other materials provided with the distribution.

*

* Neither the name of Sun Microsystems, Inc. or the names of contributors may

* be used to endorse or promote products derived from this software without

* specific prior written permission.

*

* This software is provided "AS IS," without a warranty of any kind. ALL

* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING

* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE

* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN")

* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE

* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS

* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST

* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,

* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY

* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,

* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

*

* You acknowledge that this software is not designed, licensed or intended

* for use in the design, construction, operation or maintenance of any

* nuclear facility.

*/

/*

* @(#)TicTacToe.java1.10 04/07/26

*/

import java.awt.*;

import java.awt.event.*;

import java.awt.image.*;

import java.net.*;

import java.applet.*;

/**

* A TicTacToe applet. A very simple, and mostly brain-dead

* implementation of your favorite game!

*

* In this game a position is represented by a white and black

* bitmask. A bit is set if a position is ocupied. There are

* 9 squares so there are 1<<9 possible positions for each

* side. An array of 1<<9 booleans is created, it marks

* all the winning positions.

*

* @version 1.2, 13 Oct 1995

* @author Arthur van Hoff

* @modified 04/23/96 Jim Hagen : winning sounds

* @modified 02/10/98 Mike McCloskey : added destroy()

*/

public

class TicTacToe extends Applet implements MouseListener {

/**

* White's current position. The computer is white.

*/

int white;

/**

* Black's current position. The user is black.

*/

int black;

/**

* The squares in order of importance...

*/

final static int moves[] = {4, 0, 2, 6, 8, 1, 3, 5, 7};

/**

* The winning positions.

*/

static boolean won[] = new boolean[1 << 9];

static final int DONE = (1 << 9) - 1;

static final int OK = 0;

static final int WIN = 1;

static final int LOSE = 2;

static final int STALEMATE = 3;

/**

* Mark all positions with these bits set as winning.

*/

static void isWon(int pos) {

for (int i = 0 ; i < DONE ; i++) {

if ((i & pos) == pos) {

won = true;

}

}

}

/**

* Initialize all winning positions.

*/

static {

isWon((1 << 0) | (1 << 1) | (1 << 2));

isWon((1 << 3) | (1 << 4) | (1 << 5));

isWon((1 << 6) | (1 << 7) | (1 << 8));

isWon((1 << 0) | (1 << 3) | (1 << 6));

isWon((1 << 1) | (1 << 4) | (1 << 7));

isWon((1 << 2) | (1 << 5) | (1 << 8));

isWon((1 << 0) | (1 << 4) | (1 << 8));

isWon((1 << 2) | (1 << 4) | (1 << 6));

}

/**

* Compute the best move for white.

* @return the square to take

*/

int bestMove(int white, int black) {

int bestmove = -1;

loop:

for (int i = 0 ; i < 9 ; i++) {

int mw = moves;

if (((white & (1 << mw)) == 0) && ((black & (1 << mw)) == 0)) {

int pw = white | (1 << mw);

if (won[pw]) {

// white wins, take it!

return mw;

}

for (int mb = 0 ; mb < 9 ; mb++) {

if (((pw & (1 << mb)) == 0) && ((black & (1 << mb)) == 0)) {

int pb = black | (1 << mb);

if (won[pb]) {

// black wins, take another

continue loop;

}

}

}

// Neither white nor black can win in one move, this will do.

if (bestmove == -1) {

bestmove = mw;

}

}

}

if (bestmove != -1) {

return bestmove;

}

// No move is totally satisfactory, try the first one that is open

for (int i = 0 ; i < 9 ; i++) {

int mw = moves;

if (((white & (1 << mw)) == 0) && ((black & (1 << mw)) == 0)) {

return mw;

}

}

// No more moves

return -1;

}

/**

* User move.

* @return true if legal

*/

boolean yourMove(int m) {

if ((m < 0) || (m > 8)) {

return false;

}

if (((black | white) & (1 << m)) != 0) {

return false;

}

black |= 1 << m;

return true;

}

/**

* Computer move.

* @return true if legal

*/

boolean myMove() {

if ((black | white) == DONE) {

return false;

}

int best = bestMove(white, black);

white |= 1 << best;

return true;

}

/**

* Figure what the status of the game is.

*/

int status() {

if (won[white]) {

return WIN;

}

if (won[black]) {

return LOSE;

}

if ((black | white) == DONE) {

return STALEMATE;

}

return OK;

}

/**

* Who goes first in the next game?

*/

boolean first = true;

/**

* The image for white.

*/

Image notImage;

/**

* The image for black.

*/

Image crossImage;

/**

* Initialize the applet. Resize and load images.

*/

public void init() {

notImage = getImage(getCodeBase(), "images/not.gif");

crossImage = getImage(getCodeBase(), "images/cross.gif");

addMouseListener(this);

}

public void destroy() {

removeMouseListener(this);

}

/**

* Paint it.

*/

public void paint(Graphics g) {

Dimension d = getSize();

g.setColor(Color.black);

int xoff = d.width / 3;

int yoff = d.height / 3;

g.drawLine(xoff, 0, xoff, d.height);

g.drawLine(2*xoff, 0, 2*xoff, d.height);

g.drawLine(0, yoff, d.width, yoff);

g.drawLine(0, 2*yoff, d.width, 2*yoff);

int i = 0;

for (int r = 0 ; r < 3 ; r++) {

for (int c = 0 ; c < 3 ; c++, i++) {

if ((white & (1 << i)) != 0) {

g.drawImage(notImage, c*xoff + 1, r*yoff + 1, this);

} else if ((black & (1 << i)) != 0) {

g.drawImage(crossImage, c*xoff + 1, r*yoff + 1, this);

}

}

}

}

/**

* The user has clicked in the applet. Figure out where

* and see if a legal move is possible. If it is a legal

* move, respond with a legal move (if possible).

*/

public void mouseReleased(MouseEvent e) {

int x = e.getX();

int y = e.getY();

switch (status()) {

case WIN:

case LOSE:

case STALEMATE:

play(getCodeBase(), "audio/return.au");

white = black = 0;

if (first) {

white |= 1 << (int)(Math.random() * 9);

}

first = !first;

repaint();

return;

}

// Figure out the row/column

Dimension d = getSize();

int c = (x * 3) / d.width;

int r = (y * 3) / d.height;

if (yourMove(c + r * 3)) {

repaint();

switch (status()) {

case WIN:

play(getCodeBase(), "audio/yahoo1.au");

break;

case LOSE:

play(getCodeBase(), "audio/yahoo2.au");

break;

case STALEMATE:

break;

default:

if (myMove()) {

repaint();

switch (status()) {

case WIN:

play(getCodeBase(), "audio/yahoo1.au");

break;

case LOSE:

play(getCodeBase(), "audio/yahoo2.au");

break;

case STALEMATE:

break;

default:

play(getCodeBase(), "audio/ding.au");

}

} else {

play(getCodeBase(), "audio/beep.au");

}

}

} else {

play(getCodeBase(), "audio/beep.au");

}

}

public void mousePressed(MouseEvent e) {

}

public void mouseClicked(MouseEvent e) {

}

public void mouseEntered(MouseEvent e) {

}

public void mouseExited(MouseEvent e) {

}

public String getAppletInfo() {

return "TicTacToe by Arthur van Hoff";

}

}

so if ne1 is still here, can u help? i only skimmed the tictactoe file but it seems that it has no main. this along with the error in my other program's main line may explain why they both got similar errors referring to "main". am i right about this? if not, what's wrong? and if i am, what do i hav to do to operate tictactoe?

P.S. - i corrected that mistake in my main line but i still get the same error

Message was edited by:

no1uno, shortly after posting, cuz i saw how terrible the alignment was. i'm afraid it won't get much better tho.

[11723 byte] By [no1unoa] at [2007-10-3 3:35:50]
# 1
Hi, Please use code tags before posting your query. bye for nowsat
AnanSmritia at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 2

Command Prompt:

C:\My Documents\my stuff\jdk1.5.0_08\launcher>set CLASSPATH=C:\My Documents\my stuff\jdk1.5.0_08\demo\applets\TicTacToe

C:\My Documents\my stuff\jdk1.5.0_08\launcher>java TicTacToe.class Exception in thread "main" java.lang.NoClassDefFoundError: TicTacToe/class

C:\My Documents\my stuff\jdk1.5.0_08\launcher>cd c:\My Documents\my stuff

"this i believe is when i moved the files"

C:\My Documents\my stuff>javac A1.java Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main

k here's the tictactoe:

/*

* @(#)TicTacToe.java1.10 04/07/26

*

* Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved.

*

* Redistribution and use in source and binary forms, with or without

* modification, are permitted provided that the following conditions are met:

*

* -Redistribution of source code must retain the above copyright notice, this

* list of conditions and the following disclaimer.

*

* -Redistribution in binary form must reproduce the above copyright notice,

* this list of conditions and the following disclaimer in the documentation

* and/or other materials provided with the distribution.

*

* Neither the name of Sun Microsystems, Inc. or the names of contributors may

* be used to endorse or promote products derived from this software without

* specific prior written permission.

*

* This software is provided "AS IS," without a warranty of any kind. ALL

* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING

* ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE

* OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN")

* AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE

* AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS

* DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST

* REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL,

* INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY

* OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE,

* EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

*

* You acknowledge that this software is not designed, licensed or intended

* for use in the design, construction, operation or maintenance of any

* nuclear facility.

*/

/*

* @(#)TicTacToe.java1.10 04/07/26

*/

import java.awt.*;

import java.awt.event.*;

import java.awt.image.*;

import java.net.*;

import java.applet.*;

/**

* A TicTacToe applet. A very simple, and mostly brain-dead

* implementation of your favorite game!

*

* In this game a position is represented by a white and black

* bitmask. A bit is set if a position is ocupied. There are

* 9 squares so there are 1<<9 possible positions for each

* side. An array of 1<<9 booleans is created, it marks

* all the winning positions.

*

* @version 1.2, 13 Oct 1995

* @author Arthur van Hoff

* @modified 04/23/96 Jim Hagen : winning sounds

* @modified 02/10/98 Mike McCloskey : added destroy()

*/

public

class TicTacToe extends Applet implements MouseListener {

/**

* White's current position. The computer is white.

*/

int white;

/**

* Black's current position. The user is black.

*/

int black;

/**

* The squares in order of importance...

*/

final static int moves[] = {4, 0, 2, 6, 8, 1, 3, 5, 7};

/**

* The winning positions.

*/

static boolean won[] = new boolean[1 << 9];

static final int DONE = (1 << 9) - 1;

static final int OK = 0;

static final int WIN = 1;

static final int LOSE = 2;

static final int STALEMATE = 3;

/**

* Mark all positions with these bits set as winning.

*/

static void isWon(int pos) {

for (int i = 0 ; i < DONE ; i++) {

if ((i & pos) == pos) {

won[i] = true;

}

}

}

/**

* Initialize all winning positions.

*/

static {

isWon((1 << 0) | (1 << 1) | (1 << 2));

isWon((1 << 3) | (1 << 4) | (1 << 5));

isWon((1 << 6) | (1 << 7) | (1 << 8));

isWon((1 << 0) | (1 << 3) | (1 << 6));

isWon((1 << 1) | (1 << 4) | (1 << 7));

isWon((1 << 2) | (1 << 5) | (1 << 8));

isWon((1 << 0) | (1 << 4) | (1 << 8));

isWon((1 << 2) | (1 << 4) | (1 << 6));

}

/**

* Compute the best move for white.

* @return the square to take

*/

int bestMove(int white, int black) {

int bestmove = -1;

loop:

for (int i = 0 ; i < 9 ; i++) {

int mw = moves[i];

if (((white & (1 << mw)) == 0) && ((black & (1 << mw)) == 0)) {

int pw = white | (1 << mw);

if (won[pw]) {

// white wins, take it!

return mw;

}

for (int mb = 0 ; mb < 9 ; mb++) {

if (((pw & (1 << mb)) == 0) && ((black & (1 << mb)) == 0)) {

int pb = black | (1 << mb);

if (won[pb]) {

// black wins, take another

continue loop;

}

}

}

// Neither white nor black can win in one move, this will do.

if (bestmove == -1) {

bestmove = mw;

}

}

}

if (bestmove != -1) {

return bestmove;

}

// No move is totally satisfactory, try the first one that is open

for (int i = 0 ; i < 9 ; i++) {

int mw = moves[i];

if (((white & (1 << mw)) == 0) && ((black & (1 << mw)) == 0)) {

return mw;

}

}

// No more moves

return -1;

}

/**

* User move.

* @return true if legal

*/

boolean yourMove(int m) {

if ((m < 0) || (m > 8)) {

return false;

}

if (((black | white) & (1 << m)) != 0) {

return false;

}

black |= 1 << m;

return true;

}

/**

* Computer move.

* @return true if legal

*/

boolean myMove() {

if ((black | white) == DONE) {

return false;

}

int best = bestMove(white, black);

white |= 1 << best;

return true;

}

/**

* Figure what the status of the game is.

*/

int status() {

if (won[white]) {

return WIN;

}

if (won[black]) {

return LOSE;

}

if ((black | white) == DONE) {

return STALEMATE;

}

return OK;

}

/**

* Who goes first in the next game?

*/

boolean first = true;

/**

* The image for white.

*/

Image notImage;

/**

* The image for black.

*/

Image crossImage;

/**

* Initialize the applet. Resize and load images.

*/

public void init() {

notImage = getImage(getCodeBase(), "images/not.gif");

crossImage = getImage(getCodeBase(), "images/cross.gif");

addMouseListener(this);

}

public void destroy() {

removeMouseListener(this);

}

/**

* Paint it.

*/

public void paint(Graphics g) {

Dimension d = getSize();

g.setColor(Color.black);

int xoff = d.width / 3;

int yoff = d.height / 3;

g.drawLine(xoff, 0, xoff, d.height);

g.drawLine(2*xoff, 0, 2*xoff, d.height);

g.drawLine(0, yoff, d.width, yoff);

g.drawLine(0, 2*yoff, d.width, 2*yoff);

int i = 0;

for (int r = 0 ; r < 3 ; r++) {

for (int c = 0 ; c < 3 ; c++, i++) {

if ((white & (1 << i)) != 0) {

g.drawImage(notImage, c*xoff + 1, r*yoff + 1, this);

} else if ((black & (1 << i)) != 0) {

g.drawImage(crossImage, c*xoff + 1, r*yoff + 1, this);

}

}

}

}

/**

* The user has clicked in the applet. Figure out where

* and see if a legal move is possible. If it is a legal

* move, respond with a legal move (if possible).

*/

public void mouseReleased(MouseEvent e) {

int x = e.getX();

int y = e.getY();

switch (status()) {

case WIN:

case LOSE:

case STALEMATE:

play(getCodeBase(), "audio/return.au");

white = black = 0;

if (first) {

white |= 1 << (int)(Math.random() * 9);

}

first = !first;

repaint();

return;

}

// Figure out the row/column

Dimension d = getSize();

int c = (x * 3) / d.width;

int r = (y * 3) / d.height;

if (yourMove(c + r * 3)) {

repaint();

switch (status()) {

case WIN:

play(getCodeBase(), "audio/yahoo1.au");

break;

case LOSE:

play(getCodeBase(), "audio/yahoo2.au");

break;

case STALEMATE:

break;

default:

if (myMove()) {

repaint();

switch (status()) {

case WIN:

play(getCodeBase(), "audio/yahoo1.au");

break;

case LOSE:

play(getCodeBase(), "audio/yahoo2.au");

break;

case STALEMATE:

break;

default:

play(getCodeBase(), "audio/ding.au");

}

} else {

play(getCodeBase(), "audio/beep.au");

}

}

} else {

play(getCodeBase(), "audio/beep.au");

}

}

public void mousePressed(MouseEvent e) {

}

public void mouseClicked(MouseEvent e) {

}

public void mouseEntered(MouseEvent e) {

}

public void mouseExited(MouseEvent e) {

}

public String getAppletInfo() {

return "TicTacToe by Arthur van Hoff";

}

}

and here's the A1 (after the edit):

// Test 1

public class A1

{

public static void main(String[]args)

{

System.out.println("Hello");

System.out.println("World.");

}

}

if there's anything else that ne1 didn't get just tell me.

no1unoa at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 3
note that tho the stuff under "command prompt" is in code format, it is not source code. i put it in code format so it would not get jumbled up.
no1unoa at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 4
Hi, This message is due to incorrect classpath settings. Please set your classpath bye for nowsat
AnanSmritia at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 5
set it to what? to the folder that java or javac is in or the one with the given class? cuz i did set it in the one that i wanted to run. and by this point the other one shouldn't need it because both the file and the command are in the same folder.
no1unoa at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 6
Set it to both
javaksa at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 7
Hi,Okay, try the following.Before check tools.jar is available in lib directory.Then Include JAVA_HOME\lib in your class path . then compile againbye for nowsat
AnanSmritia at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 8
where do i put that in my classpath? is that just the classpath or do i put that at the end of my classpath or what?
no1unoa at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 9

ok here's the deal now. the my stuff folder contains java.c, java.h, javac.exe (tho all these files are also in their original places as well), the jdk1.5.0_08 folder, and the A1 file. i type in command prompt (after being prompted by C:\>):

"My Documents\my stuff\jdk1.5.0_08\bin\javac" A1.java

i get:

error: cannot read: A1.java

1error

i wrote the file in notepad and saved it as A1.java as a .txt file in ANSI encoding or whatever. so why can't it read it?

no1unoa at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 10
Hi, Did you try this Include JAVA_HOME\lib in your class path . then compile againbye for nowsat
AnanSmritia at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 11
did u read my response to that earlier? i'm not clear exactly where u want me to put this.
no1unoa at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 12
Hi,First check whether you have tools.jar in your lib folder. If it is there then add this lib folder into your classpath.For more classpath information http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html bye for nowsat
AnanSmritia at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 13

i type after javac:

-classpath c:\My Documents\my stuff\jdk1.5.0_08\lib

followed by a space and the file name, and get a message saying:

javac: invalid flag: and

followed by the help info for javac.

i also tried what u see above followed by (each line represents what i typed immediately after the code above and immediately before the file name in each attempt):

\tools

\tools.jar

-sourcepath c:\My Documents\my stuff

and each time i got the same results. will u plz type out what u expect me to type?

no1unoa at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 14

no1uno, you should give up on this applet that you didn't write and don't understand.

what have you read about Java so far? right now it doesn't sound like you know much of anything about Java or computers. You're going to have to get some more basic information before proceeding.

Start with this:

http://www.iut-info.univ-lille1.fr/docs/tutorial/getStarted/cupojava/win32.html

Once you get this to work, buy a book or start working through the Sun tutorial slowly:

http://java.sun.com/docs/books/tutorial/

It should not take all day to compile a single Java program. If you can't do it, then you should find another way to learn how. This forum isn't the best place for tutoring or hand-holding.

%

duffymoa at 2007-7-14 21:30:40 > top of Java-index,Java Essentials,New To Java...
# 15

Hi,

Try this

1. Go to your desktop screen

2. Select My Computer Icon and Right Click

3. Select Properties from the Popup Menu

4. Select Advanced Tab

5. Click Environment Variables button

6. Now click New button in the User Variables and enter JAVA_HOME then value C:\ Java Home Directory ( This path may vary from user to user)

7. Select classpath from System variables then click Edit and add C:\Java Home Directory\lib\tools.jar

Then apply these changes

then try your program

bye for now

sat

AnanSmritia at 2007-7-21 10:14:17 > top of Java-index,Java Essentials,New To Java...