Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Run As 1 Java Application?(How do I run a simple .java file? Toolbar > Run > Run As keeps telling me no applicable.)
icon1.gif  Run As 1 Java Application? [message #1752660] Wed, 25 January 2017 21:30 Go to next message
Lennart Michel is currently offline Lennart MichelFriend
Messages: 1
Registered: January 2017
Junior Member
My Java learning app on my phone (Sololearn learn Java) gave me the piece of code that is attached.
It´s just some basic "Hello World" output which works fine in cmd.
The tutorial tells me to do Toolbar > Run > Run As > 1 Java Application.
But for me it only says no applicable at that point.
I have no idea what to do now.
I guess that´s because an older version used in the tutorial.
Google doesn´t tell me either.
Now what do I have to do in order to get a usable output?
-
I am a total noob and just got started.
So excuse me for my stupidity, I probably just made some stupid mistake.
Hopefully I do all of this posting thing the right way, if not, tell me.

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


[Updated on: Thu, 26 January 2017 15:45] by Moderator

Report message to a moderator

Re: Run As 1 Java Application? [message #1752750 is a reply to message #1752660] Thu, 26 January 2017 20:59 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4492
Registered: July 2009
Senior Member

Eclipse isn't particularly oriented toward the starting "here's a single file, just run it" scenario. It's able to handle compiling and running against different Java Runtimes and using whatever collection of libraries and other dependencies you might have, all of which is controlled by having a Java Project and defining those things there. I'm not sure why JDT's own basic tutorial chooses to have you import JUnit's sources, but you should get the gist of it from http://help.eclipse.org/neon/topic/org.eclipse.jdt.doc.user/gettingStarted/qs-3.htm?cp=1_1_0_1 and http://help.eclipse.org/neon/topic/org.eclipse.jdt.doc.user/reference/ref-wizard-java-project.htm?cp=1_4_9_0_0 .

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:The selected wizard could not be started.
Next Topic:Fabric sdk supported by Eclipse or not?
Goto Forum:
  


Current Time: Tue Sep 24 01:35:56 GMT 2024

Powered by FUDForum. Page generated in 0.05622 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top