LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 01: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, 01: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, 01: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, 01: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, 09:14 AM   #5
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
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, 05: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 05:15 PM.
 
Old 11-14-2005, 05: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, 05: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 05:18 PM.
 
Old 11-14-2005, 05: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: 31
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



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 03:04 AM
java programming asahlot Programming 3 10-13-2005 10:30 AM
java programming ksd Programming 7 10-15-2003 06:29 PM
Java programming in a shell lolmc Programming 2 12-13-2001 08:12 AM
java programming mAineAc Programming 3 07-06-2001 09:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:27 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