Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-12-2008, 12:03 AM
Member
 
Join Date: Jan 2008
Posts: 3
TheBayWatchMan is on a distinguished road
executing the java file
Hi there, I am relatively new to the Java expierience! I only have one problem. I am using a text editor to execute a java file (I do have eclipse, but just want to see how it works using the Command Prompt). I am working through the tutorials on the java.sun website and am currently busy with the helloworld part (http://java.sun.com/docs/books/tutor...ava/unix.html). I can compile the text file using the 'javac' command, but cannot execute the class file using the 'java' command. Attached is the error.

Any suggestions

Thanks in advance
Attached Files
File Type: zip 'java' exception.zip (23.7 KB, 4 views)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-12-2008, 12:18 AM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Welcome TBWM!

Have you looked over the source files? That error message appears to be telling you it's a name issue - double check your code.

See you around!
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 01-12-2008, 10:28 AM
Member
 
Join Date: Jan 2008
Posts: 3
TheBayWatchMan is on a distinguished road
Thanks! No that's not it. Here is my .java file's contents:

class Hello
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}

The thing is the javac command did not work at first so I had to change the Path variable to include all of the java commmands. Is it possible that the problem might be there somewhere? The tutorial tells you that you must edit the CLASSPATH variable, but I do not have one and I tried to create one, but it still didnt work

Thanks
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 01-12-2008, 10:38 AM
CaptainMorgan's Avatar
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
Ah.. I apologize, I assumed you already had this set. Not to start a flame war, but this is one of the reasons I love to use Linux, it makes setting this up much easier than on Windows.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 01-12-2008, 11:31 AM
Member
 
Join Date: Jan 2008
Posts: 3
TheBayWatchMan is on a distinguished road
I set that, but i still get the same error message as soon as I try and execute the file. And yes I am getting Ubuntu as soon as the stellenbosch network gets some life again. hehe

thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Executing stored procedures mew Database 3 08-20-2008 07:47 PM
Problem with executing mcal New To Java 2 02-09-2008 03:51 PM
Problem with executing .jar files hiranya NetBeans 2 10-02-2007 09:24 PM
Executing Batch zcoarens New To Java 0 08-14-2007 11:49 AM
Executing a jar file peiceonly New To Java 2 04-06-2007 04:32 PM


All times are GMT +3. The time now is 01:59 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org