Eclipse "Run as" does not have the "Java Application" option (what is needed to run the / .java class?)

I want to run a specific .java file (class), but Eclipse does not work.

I tried to follow the instructions here -> eclipse how to run another class

... but my Run As menu item never contains a Java Project.

I tried to access the menu after right-clicking on the .java panel and the tab itself, as well as from the name and .java name in the Explorer class, but of course it does not matter. The only option I have ever received is Run Configurations.

(and yes, my .java has a "main" method.)

import com.jsyn.JSyn; public class SuperSimpleSounds { public static void main() { [...] 

What, in fact, is necessary in order to be able to run a separate class (a separate .java file)?

+8
java eclipse
source share
2 answers

Add String array argument to main method as expected using JVM

 public static void main(String[] args) { 
+20
source share

Also one trick when you want to open some Java classes that you downloaded elsewhere is to create a new Java project. Then move all java classes to the src folder of the project. Now you can start with the option "run as a Java application".

+1
source share

All Articles