LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 11-09-2005, 02:28 PM   #1
sharapchi
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: slackware
Posts: 119

Rep: Reputation: 15
java support and programming with java


Hi,
How can i enable java on my slackware 10.2 OS and how can i do java programming?
 
Old 11-09-2005, 02:31 PM   #2
amer_58
Member
 
Registered: Mar 2004
Distribution: Slackware 10.2
Posts: 213

Rep: Reputation: 30
I use netbeans-4.1
http://java.sun.com/j2se/1.4.2/download.html
 
Old 11-09-2005, 02:33 PM   #3
amer_58
Member
 
Registered: Mar 2004
Distribution: Slackware 10.2
Posts: 213

Rep: Reputation: 30
or you can just download the lib needed and use any editor and then javac your file, you will also have to edit your $path
 
Old 11-09-2005, 02:37 PM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Slackware 10.2 comes with a version of the JDK (and JRE for that matter). You can install them from your CDs, or get them from these links:

http://slackware.it/en/pb/showdesc.p..._5_0_04-i586-2
http://slackware.it/en/pb/showdesc.p..._5_0_04-i586-2
 
Old 11-10-2005, 10:14 AM   #5
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 14.1 (multilib)
Posts: 1,210

Rep: Reputation: 55
You could also try an integrated development environment like Borland JBuilder or Eclipse. Both are free. I use JBuilder. It checks for errors as you go and is very straightforward to use as a programming environment. Eclipse is supposed to be very good but I have no experience with it.

The only problem I have found in JBuilder is that it defaults to using visual gui development. Fine if you want it but if you don't it is possible to circumvent it.
 
Old 11-14-2005, 06:06 PM   #6
sharapchi
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: slackware
Posts: 119

Original Poster
Rep: Reputation: 15
Thanks for all.
I am new you know. How can i compile java sources?
For example i have a source file like this :

Code:
Welcome1 {
	main(String args[])
	{
		System.out.println("Hello world");
	}
Welcome1 {
	main(String args[])
	{
		System.out.println("Hello world");
	}
}
I think i have to compile like this :
Code:
bash-3.00$ javac welcome.java
welcome.java:1: 'class' or 'interface' expected
Welcome1 {
^
1 error
But as you see i get a error i dont know why?

Last edited by sharapchi; 11-14-2005 at 06:15 PM.
 
Old 11-14-2005, 06:07 PM   #7
sharapchi
Member
 
Registered: Nov 2004
Location: Turkey
Distribution: slackware
Posts: 119

Original Poster
Rep: Reputation: 15
I am used not use IDE. But thanks for this.
 
Old 11-14-2005, 06:10 PM   #8
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally posted by sharapchi
But as you see i get a error i thont know why?
You are missing the class or interface keyword:

Code:
public class Welcome1
{
   public static void main(String[] args)
   {
       System.out.println("Hello World!");
   }
}
Edit: also, your source file must have the same name as your class, so for the example above, your file should be called Welcome1.java.

Last edited by Nylex; 11-14-2005 at 06:18 PM.
 
Old 11-14-2005, 06:47 PM   #9
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 30
check out for this book:

Thinking in Java, Bruce Eckel

It's real nice and it helped me a lot when I was learning off Java

keep it up, Java rules
 
  


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
Java Programming: Java Runtime Environment not found when trying to compile murbz Linux - Software 2 03-26-2009 04:04 AM
java programming asahlot Programming 3 10-13-2005 11:30 AM
java programming ksd Programming 7 10-15-2003 07:29 PM
Java programming in a shell lolmc Programming 2 12-13-2001 09:12 AM
java programming mAineAc Programming 3 07-06-2001 10:42 AM


All times are GMT -5. The time now is 03:43 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration