Re: A question about Sun Microsystems Java program

  • From: Dave <davidct1209@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sat, 12 Jun 2010 01:42:59 -0700

It's kind of interesting how Java locates the entry point of an application.

When you type "java <classname>", java attempts to load the class
specified, and through reflection, locate the main method.  In other
words, you want to enter the name of the class that contains the main
method of your application; this is because there could be multiple
.class files within your app.

Probably tmi since you've already got your app running, but hth!
- David

On 6/11/10, Sina Bahram <sbahram@xxxxxxxxx> wrote:
> Javac is a compiler. That's what the c stands for. You want the java
> command, and you want to run the class name, so "java
> GradeSheet" would be my first guess.
>
> Take care,
> Sina
> -----Original Message-----
> From: programmingblind-bounce@xxxxxxxxxxxxx
> [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Gilbert Neiva
> Sent: Friday, June 11, 2010 9:22 PM
> To: programmingblind@xxxxxxxxxxxxx
> Subject: A question about Sun Microsystems Java program
>
> How do you run a .class program using javac. When I typed javac and then the
> name of my .java file, it compiled it into a class
> file, but it didn't run. The program I'm trying to run and compile into a
> class file is a simulation of a grade sheet. It asks for a
> name, course number and assignment number. It then displays the user's name,
> course number and name, and assignment number along
> with various labels that display the person's score. When I typed Javac
> GradeSheet.java, GradeSheet.java being the name of my
> program source file, it didn't ask me for anything. It just compiled into a
> .class file. Can anyone help me with this problem. I
> made the source file with Eclipse, but the instructor whom I'm suppose to
> hand in this program will no doubt be running the javac
> program.
>
> Gilbert Neiva
>
>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
>
__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: