| Forum |
|
|||||||
| Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
| Advertisements. Register and be a member of the community to get rid of them. | |
|
Advertisement
|
|
|
|
#3 (permalink) |
|
Just another linux lover.
Join Date: Jun 2006
Location: Bangalore, KA
Posts: 559
|
AFAIK Java is same on any platform and uses the same command set to compile and run java programs...
Install JDK on your system and use it as you use it on Windows...
__________________
Today is a most unusual day, because we have never lived it before; we will never live it again; it is the only day we have. (Registered Linux User #432737 - subratabera.blogspot.com) |
|
|
|
|
#5 (permalink) |
|
Wise Old Owl
Join Date: Dec 2005
Location: Space-time continuum
Posts: 1,646
|
@Vivek788, You must install Sun's Java JDK 6.0. Get it from here
Select JDK 6.0 Click on the "Download" button. For Full instructions of Installing Java in Linux Click here After you have installed the Java JDK RPM. You need to follow these steps: Open the Terminal Window & type: $ su - (Enter root password) # gedit /etc/profile.d/java.sh Add the following line at the end of the file Code:
export JAVA_HOME=/usr/java/jdk1.6.0
export PATH=$JAVA_HOME/bin:$PATH
Now logout & login again to see the changes. To compile a Java File: $ Javac FileName.java To Run a Java Program: $ java FileName
__________________
* Imagination is more important than knowledge. -Albert Einstein Last edited by JGuru; 13-01-2007 at 06:02 PM. Reason: To make some changes |
|
|
|
|
#6 (permalink) |
|
The No.1 Stupid
Join Date: May 2005
Location: CYBERYARD
Posts: 1,705
|
^^just a correction , the last line should be
$java classname this is the class having main function. The filename and classname may not be same.
__________________
n00b forever... |
|
|
|
|
#7 (permalink) |
|
Wise Old Owl
Join Date: Dec 2005
Location: Space-time continuum
Posts: 1,646
|
@Phenom, As per Sun's JAVA Language design, a Class having the main() function, must
be the name of the File!!! You can't specify any filename like in C/C++!!! So I said "Java FileName" (To make things simpler for him). Actually it's "Java classname".
__________________
* Imagination is more important than knowledge. -Albert Einstein |
|
|
|
|
#9 (permalink) |
|
OSS Enthusiast!
Join Date: Sep 2005
Location: Hills of Kumaoun
Posts: 664
|
Recently I installed fc6...
I did a custom install and selected developer's tools too. I tried to compile and exectute Java program on Eclipse and I was successful! The only prb is tht my pc is old so eclipse was jst tooooooooo slow!
__________________
Do you know, Shinigamis only eat apples??? |
|
|
|
|
#10 (permalink) |
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Distros like FC and Suse mostly give a java compiler bundled in too. If you do full install then mostly these tools are installed. It actually depends on the distro.
And nitish is it sun-java or gcj? nitish why don't you try something that's light? You have a nice excuse to learn emacs. It will be light on resources. It does have a big learning curve though as I have heard. But you can try xemacs + jdee. You can also use kate, but it is not an IDE just an editor with syntax highlighting.
__________________
http://www.bash.org/?258908 |
|
|
|
|
#11 (permalink) |
|
Wise Old Owl
Join Date: Dec 2005
Location: Space-time continuum
Posts: 1,646
|
@Nitish, Use NetBeans IDE 5.0 BlueJ Edition. It's a very good Java IDE for School
students, who are learning Java. It's easy to use, also it uses very less RAM!! Download it from here Also read Tutorial on using NetBeans IDE 5.0 BlueJ Edition Click here Also you must install Sun's Java JDK1.6.0. & not gcj (like @Mehul said). Fedora Core 6 ships will gcj , not Sun's JDK!!!
__________________
* Imagination is more important than knowledge. -Albert Einstein |
|
|
|
|
#12 (permalink) |
|
OSS Enthusiast!
Join Date: Sep 2005
Location: Hills of Kumaoun
Posts: 664
|
Well,As soon as I gt Linux installed in my computer's lab I wll try it!
Well In my home I was using SUN Java Eclipse IDE!
__________________
Do you know, Shinigamis only eat apples??? |
|
|
|
|
#14 (permalink) | |
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Quote:
__________________
http://www.bash.org/?258908 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|