Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Extreme beginer

Reply
Thread Tools

Extreme beginer

 
 
K
Guest
Posts: n/a
 
      10-11-2012
This is what I have in eclipse and when I run the program in regular and debug mode nothing seems to work only some code stuff appears at the bottom of the screen in some pane and I don't know why because in the book i'm reading thats not what happens


public class Class2 {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("hello");
}

}
 
Reply With Quote
 
 
 
 
markspace
Guest
Posts: n/a
 
      10-11-2012
On 10/10/2012 8:10 PM, K wrote:
> This is what I have in eclipse and when I run the program in regular
> and debug mode nothing seems to work only some code stuff appears at
> the bottom of the screen in some pane and I don't know why because in
> the book i'm reading thats not what happens
>



That "code stuff" might be important, dontcha think? Copy and paste it
here, exactly as it appears. Getting the details exactly correct are
important, otherwise we can't help you.

When I tried this just now, I saw the string "hello" appear on the
Console tab. Make sure you're looking at that one. When I deliberately
introduced an error, the errors also appeared in the Console tab.


>
> public class Class2 {
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> // TODO Auto-generated method stub
> System.out.println("hello");
> }
>
> }
>

 
Reply With Quote
 
 
 
 
Lew
Guest
Posts: n/a
 
      10-11-2012
markspace wrote:
> K wrote:
>> This is what I have in eclipse and when I run the program in regular
>> and debug mode nothing seems to work only some code stuff appears at
>> the bottom of the screen in some pane and I don't know why because in
>> the book i'm reading thats not what happens

>
> That "code stuff" might be important, dontcha think? Copy and paste it


That is, do not paraphrase it.

> here, exactly as it appears. Getting the details exactly correct are
> important, otherwise we can't help you.


It's likely that the error messages you saw contain the answers you seek.

> When I tried this just now, I saw the string "hello" appear on the
> Console tab. Make sure you're looking at that one. When I deliberately
> introduced an error, the errors also appeared in the Console tab.


I am betting you didn't invoke the compiler or runtime correctly, K.

--
Lew
 
Reply With Quote
 
K
Guest
Posts: n/a
 
      10-13-2012
this is what appeared at the bottom of the screen in the console tab


Usage: javaw [-options] class [args...]
(to execute a class)
or javaw [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-server to select the "server" VM
-hotspot is a synonym for the "server" VM [deprecated]
The default VM is server.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
 
Reply With Quote
 
K
Guest
Posts: n/a
 
      10-13-2012
On Thursday, October 11, 2012 12:07:04 AM UTC-7, Lew wrote:
> markspace wrote:
>
> > K wrote:

>
> >> This is what I have in eclipse and when I run the program in regular

>
> >> and debug mode nothing seems to work only some code stuff appears at

>
> >> the bottom of the screen in some pane and I don't know why because in

>
> >> the book i'm reading thats not what happens

>
> >

>
> > That "code stuff" might be important, dontcha think? Copy and paste it

>
>
>
> That is, do not paraphrase it.
>
>
>
> > here, exactly as it appears. Getting the details exactly correct are

>
> > important, otherwise we can't help you.

>
>
>
> It's likely that the error messages you saw contain the answers you seek.
>
>
>
> > When I tried this just now, I saw the string "hello" appear on the

>
> > Console tab. Make sure you're looking at that one. When I deliberately

>
> > introduced an error, the errors also appeared in the Console tab.

>
>
>
> I am betting you didn't invoke the compiler or runtime correctly, K.
>
>
>
> --
>
> Lew


Usage: javaw [-options] class [args...]
(to execute a class)
or javaw [-options] -jar jarfile [args...]
(to execute a jar file)

where options include:
-server to select the "server" VM
-hotspot is a synonym for the "server" VM [deprecated]
The default VM is server.

-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      10-13-2012
K wrote:
> this is what appeared at the bottom of the screen in the console tab
>
> Usage: javaw [-options] class [args...]
> (to execute a class)
> or javaw [-options] -jar jarfile [args...]
> (to execute a jar file)
> [etc.]


and is that how you used it?

--
Lew
 
Reply With Quote
 
markspace
Guest
Posts: n/a
 
      10-13-2012
On 10/12/2012 7:36 PM, K wrote:
> this is what appeared at the bottom of the screen in the console tab
>
> Usage: javaw [-options] class [args...]


[snip]


If this is appear on an Eclipse screen, then something is very wrong.
I'd uninstall and reinstall. I'd also check your project type to make
certain you created the right type of project, and double check the
location of your source file to make sure you didn't put it inside the
build script or the META-INF directory or something.

The Eclipse forums could probably help you better, I have no deep
knowledge of Eclipse that would allow me to debug a problem like this.

<http://www.eclipse.org/forums/>


 
Reply With Quote
 
markspace
Guest
Posts: n/a
 
      10-13-2012
On 10/13/2012 8:54 AM, markspace wrote:

> The Eclipse forums could probably help you better, I have no deep
> knowledge of Eclipse that would allow me to debug a problem like this.
>
> <http://www.eclipse.org/forums/>



P.S. I assume this is your thread here?

<http://www.eclipse.org/forums/index.php/m/740799/>

I see they couldn't come up with anything either. If the re-install
doesn't do it, I think you should double check the location and type of
the JDK.

Open a regular Windows command console and type "java -version" and copy
the text output. (There's a menu in the upper left corner that allows
you to mark an area of the screen for copying, then copy to the
clipboard by pressing Enter.)

Show us that, your path (output of the PATH command), and then CD to the
directory that your JDK is in and do a DIR of the /bin directory too,
show us the result of that. I have no idea if this will help, but
screwy symptoms call for screwy solutions.



 
Reply With Quote
 
K
Guest
Posts: n/a
 
      10-13-2012
On Friday, October 12, 2012 10:37:29 PM UTC-7, Lew wrote:
> K wrote:
>
> > this is what appeared at the bottom of the screen in the console tab

>
> >

>
> > Usage: javaw [-options] class [args...]

>
> > (to execute a class)

>
> > or javaw [-options] -jar jarfile [args...]

>
> > (to execute a jar file)

>
> > [etc.]

>
>
>
> and is that how you used it?
>
>
>
> --
>
> Lew


what do you mean? Plus where is the java compiler I can't find it
 
Reply With Quote
 
markspace
Guest
Posts: n/a
 
      10-13-2012
On 10/13/2012 12:18 PM, K wrote:

> what do you mean? Plus where is the java compiler I can't find it


javac (The Java compiler) should be on your path. It should install in
one of the Java directories in /Program Files of one stripe or another,
if you're on Windows.

Take a look there for it.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
One word to the right extreme and another to the left extreme karthikbalaguru C Programming 9 03-22-2009 01:10 AM
Extreme III vs. Extreme IV CF cards jj@unspameljefe.net Digital Photography 15 04-15-2007 04:31 AM
SanDisk Extreme IV compact flash and Extreme Firewire card reader reviewed Digital Photography Now Digital Photography 0 08-05-2006 11:28 AM
dummy beginer's question Lloyd Dupont ASP .Net 6 11-21-2005 05:42 PM
Beginer need helppp!! My and I ASP .Net 1 08-24-2004 07:46 PM



Advertisments