Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
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-16-2008, 03:57 AM
Member
 
Join Date: Jan 2008
Posts: 5
VinceGuad is on a distinguished road
Quick Help Please! Can't Run Code!!
I have Java 6 Update 4 installed on my computer as well as Eclipse Classic 3.3.1 (both downloaded and installed today)

When I go to Run -- > Run As inside Eclipse it shows (None Applicable)


can anyone tell me why this is and how to fix this? I cannot run anything ! Seems as if its not detecting my Java
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-16-2008, 04:24 AM
roots's Avatar
Moderator
 
Join Date: Jan 2008
Location: Dallas
Posts: 263
roots is on a distinguished road
it shows Run as Java Application if the code in the editor has main method ..
public static void main(String[] args)..
__________________
dont worry newbie, we got you covered.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 04:39 AM
Member
 
Join Date: Jan 2008
Posts: 5
VinceGuad is on a distinguished road
There's nothing wrong with the code

Code:
//******************************************************************** // Lincoln.java Author: Lewis/Loftus // // Demonstrates the basic structure of a Java application. //******************************************************************** public class Lincoln { //----------------------------------------------------------------- // Prints a presidential quote. //----------------------------------------------------------------- public static void main (String[] args) { System.out.println ("A quote by Abraham Lincoln:"); System.out.println ("Whatever you are, be a good one."); } }
Heres a screenshot also




Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 04:47 AM
roots's Avatar
Moderator
 
Join Date: Jan 2008
Location: Dallas
Posts: 263
roots is on a distinguished road
Now i see it ..

You need to define a project before you can execute a java code. I could not see any project in Package Explorer in the image.

Create new project. And paste that file to src folder of that project every thing will be alright
__________________
dont worry newbie, we got you covered.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 04:54 AM
Member
 
Join Date: Jan 2008
Posts: 5
VinceGuad is on a distinguished road
Beautiful, that worked just fine
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
Simple version of quick sort Java Tip Algorithms 0 04-15-2008 08:40 PM
Wanna make 5 quick bucks? GodiaN Java Applets 5 01-21-2008 08:15 PM
Quick Stupid Question bluekswing New To Java 7 01-08-2008 07:35 PM
Quick Job required in Java taxman Jobs Offered 0 01-02-2008 12:46 PM
Quick Question (Functions) ibanez270dx New To Java 2 11-16-2007 02:42 AM


All times are GMT +3. The time now is 02:09 PM.


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