LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-16-2009, 08:04 AM   #1
abhi1988srivastava
LQ Newbie
 
Registered: Dec 2009
Posts: 9

Rep: Reputation: 0
java progamming on linux


Hi

i just now started with linux and have very basic knowledge of vi script, commands and all. may i know , knowing all this can i shift to java programming on linux.
and may i also know any tutorial or book , which i can refer?

Thanking in advance
 
Old 12-16-2009, 08:08 AM   #2
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Java programming in linux is the same as everywhere else. If you know Jva, you can execute your code anywhere, linux doesn't make it anything different.

Regards
 
Old 12-16-2009, 08:12 AM   #3
abhi1988srivastava
LQ Newbie
 
Registered: Dec 2009
Posts: 9

Original Poster
Rep: Reputation: 0
May i know what all i need to have to do run my java code on linux except knowing java and having linux.

any tutorial to know how to run the code and its whereabouts?

Thanks
 
Old 12-16-2009, 08:15 AM   #4
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
You need JDK and JRE like you would in windows or elsewhere.
Compile as usual : javac prgname.java
Execute as usual : prgname

If you are looking for a good Java book, read Java: the complete reference by Herbert Schildt

Regards
 
Old 12-16-2009, 08:18 AM   #5
mctechy
LQ Newbie
 
Registered: Jan 2007
Location: San Francisco Bay Area
Distribution: Ubuntu 6.10
Posts: 1

Rep: Reputation: 0
If you search using "linux java eclipse tutorial" you should be able to find what you are looking for...
 
Old 12-16-2009, 08:23 AM   #6
archlinux_jessica
Member
 
Registered: Aug 2009
Location: PA USA
Distribution: Arch Linux
Posts: 78

Rep: Reputation: 19
Google is always a good reference. Its exactly the same on Windows. You can download and install netbeans if you wish, or use similar editors you would use in Windows. If you want to use commandline its the same as well.

javac test.java
java test

jar also exists the same as it does on Windows. You might need to tell Linux the default program to run the jar file when you double click, because sometimes it tries to run it with a file extracting program instead by default.

-Jessica-
 
Old 12-16-2009, 08:35 AM   #7
abhi1988srivastava
LQ Newbie
 
Registered: Dec 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks everyone

Got my answer

Thanks alot
 
Old 12-19-2009, 12:38 PM   #8
AeonX
LQ Newbie
 
Registered: Jul 2009
Posts: 21

Rep: Reputation: 0
so there's no difference in the syntax in java between windows and linux?
 
Old 12-23-2009, 01:38 PM   #9
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by AeonX View Post
so there's no difference in the syntax in java between windows and linux?
Are you asking about the language itself, or the command line program "java"? If the former: no, why would there be? It's a programming language, so why should it depend on the platform you're using? The language just gives the programmer an interface to the computer - the details of the platform and architecture should be hidden from the programmer, since they don't really need to know about those (in some sense) for high level programming. Of course, some details will differ between platforms - like specifying paths to files, for example. However, these aren't part of the languages concerned.
 
Old 12-25-2009, 12:48 PM   #10
AeonX
LQ Newbie
 
Registered: Jul 2009
Posts: 21

Rep: Reputation: 0
ok thanks for replying as thats what i wanted to know
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
please help me (socket progamming in C) kannansubash Linux - Networking 1 06-23-2009 10:03 AM
plz help regarding TCP/IP socket progamming in LINUX kernel omkarlagu Programming 0 01-20-2006 08:03 AM
Linux and Java + Java Media Framework (JMF) perry Programming 0 11-03-2003 10:08 AM
Graphic progamming under Linux so_o Programming 9 09-16-2003 06:38 PM


All times are GMT -5. The time now is 11:59 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration