LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2006, 01:02 AM   #1
JerryMcFarts
Member
 
Registered: Mar 2004
Location: Ohio, USA
Distribution: Ubuntu 6.04
Posts: 117

Rep: Reputation: 15
Eclipse: No Java under Run Menu


Hello,
I am trying to learn a few suites of Programming on the Linux side. My question is currentl on the Java Programming Language. I have installed eclipse and it runs nice and smooth.

But when i was doing the tutorial, doing the "Hello World" program. I went to "Run -> Run As ->" but there is no "Java" option

It only shows "eclipse Application". I konw Java is installed:
Code:
$ java -version
java version "1.4.2-02"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-02)
Java HotSpot(TM) Client VM (build Blackdown-1.4.2-02, mixed mode)
 
Old 03-31-2006, 02:31 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Can we take a look at the code? If you don't have a public static void main method you won't be able to run as application. I also am wondering if you have Java SDK, not only the RE.
 
Old 03-31-2006, 12:18 PM   #3
JerryMcFarts
Member
 
Registered: Mar 2004
Location: Ohio, USA
Distribution: Ubuntu 6.04
Posts: 117

Original Poster
Rep: Reputation: 15
The Code is pretty huey. I have never really done any Java here is there Eclipse code, from the welcome tutorial, that I put in
Code:
public class HelloWorld {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
System.out.println("Hello World!");
	}
}
But the real problem is there no Java option under the Run pulldown.

How would I check if I had SDK on my system?
 
Old 03-31-2006, 12:30 PM   #4
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
usually the first time you attempt to run an application you have to right click on the source file in the file navigation panel and goto run, then you should see run as java application..

it does not seem to showup initially on the top menu for some reason..

to see if you have sdk try a `locate javac` and see what it says..
 
Old 03-31-2006, 12:43 PM   #5
JerryMcFarts
Member
 
Registered: Mar 2004
Location: Ohio, USA
Distribution: Ubuntu 6.04
Posts: 117

Original Poster
Rep: Reputation: 15
Code:
$ locate javac
/usr/share/doc/ant/manual/OptionalTasks/javacc.html
/usr/share/doc/ant/manual/CoreTasks/javac.html
/usr/share/vim/vim63/syntax/javacc.vim
/usr/share/vim/vim63/compiler/javac.vim
I don't know if that means my SDK is installed.

Quote:
usually the first time you attempt to run an application you have to right click on the source file in the file navigation panel and goto run, then you should see run as java application..

So I did that an I believe it ran. Displayed Hello World in bottom of the screen. Sweet.
 
Old 03-31-2006, 12:57 PM   #6
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
>So I did that an I believe it ran. Displayed Hello World in bottom of the screen. Sweet.
cool! its alive! muwhahahaha!

anyhow.. no the results you got back from locate are not saying you have sdk installed..

but apparently it is either on there somewhere else or eclipse is compiling it.. i have not looked behind the scenes in eclipse to see what it will do if there is no sdk, maybe it has its own version.. ??

anyhow since your program executed then there has to be somthing there.. not that you have run it once is is runnable by clicking the run button at the top of the screen? it should be..
 
Old 03-31-2006, 02:07 PM   #7
JerryMcFarts
Member
 
Registered: Mar 2004
Location: Ohio, USA
Distribution: Ubuntu 6.04
Posts: 117

Original Poster
Rep: Reputation: 15
yes now it's up top. in the Run Menu. Eclipse is pretty neat. I have used Visual Basic .Net and It is nice to build Windows and applying Widgets.

Does Eclipse offer this feature? From what I see I don't see anything of that nature. I also was looking at Glade, which does that, but I having separate problems with that program :-P
 
Old 03-31-2006, 02:30 PM   #8
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
yeh eclipse is nice.. i use it pretty much all day every day and have few complaints.. there are a couple of weird things it will do sometimes.. but still its the best java ide i have used..

and there is a plugin for eclipse call VE or 'visual editor'.. you can find it on the eclipse website.. it will assist in building uis..
 
Old 04-01-2006, 04:04 AM   #9
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by JerryMcFarts
yes now it's up top. in the Run Menu. Eclipse is pretty neat. I have used Visual Basic .Net and It is nice to build Windows and applying Widgets.

Does Eclipse offer this feature? From what I see I don't see anything of that nature. I also was looking at Glade, which does that, but I having separate problems with that program :-P
I believe NetBeans has Matisse for such a feature.

http://www.netbeans.org/kb/articles/matisse.html

There's even an eclipse plugin in the works:

http://www.myeclipseide.com/ContentE...y-ceid-77.html
 
Old 05-12-2006, 12:48 AM   #10
aluchko
Member
 
Registered: Mar 2004
Location: Edmonton, AB, Canada
Distribution: Fedora
Posts: 37

Rep: Reputation: 15
Quote:
Originally Posted by xhi
anyhow.. no the results you got back from locate are not saying you have sdk installed..

but apparently it is either on there somewhere else or eclipse is compiling it.. i have not looked behind the scenes in eclipse to see what it will do if there is no sdk, maybe it has its own version.. ??
Eclipse compiles using the Eclipse Compiler for Java (ecj) so all it needs is a JVM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run Eclipse? max2004 Fedora 10 02-22-2006 02:37 AM
Need help with Java and Eclipse VE Veteq Programming 1 11-10-2005 07:01 PM
java and eclipse eng_raar Programming 4 01-08-2005 05:20 PM
Eclipse Can't Find Java jeffChuck Linux - Software 5 01-04-2005 06:06 AM
can't run eclipse tazaran Linux - Software 12 06-11-2004 03:46 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration