LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-14-2007, 07:56 AM   #1
angryfirelord
Member
 
Registered: Dec 2005
Posts: 497

Rep: Reputation: 58
jdk not in correct path


I downloaded the jdk slack package from slackware-current and installed it successfully. Firefox seems to have picked it up, but if I type java or javac at the prompt, it can't find it. Doing a whereis java command reveals that it is located in /usr/lib/java. Is there a way to set it so that I can use it at the terminal & so Netbeans can find it?
 
Old 02-14-2007, 08:12 AM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
Code:
ln -s /usr/lib/java/javac /usr/bin
ln -s /usr/lib/java/java /usr/bin
I tought the symlinks were created automatically...

Edit: I've just checked, /usr/lib/java is added in the PATH variable by the file /etc/profile.d/jdk.sh (or jdk.csh, depends on your shell) which should be executed when you login. Maybe you're using runlevel 4 and you're not using a X terminal with the login option.

Last edited by gbonvehi; 02-14-2007 at 08:19 AM.
 
Old 04-07-2007, 05:01 PM   #3
angryfirelord
Member
 
Registered: Dec 2005
Posts: 497

Original Poster
Rep: Reputation: 58
I am using runlevel 5 (running XFCE). However, now the jdk & jre versions don't match up (1.5.0.9 & 1.6), so I'm going to try to use gcj instead.

I've created a simple Hello.java file:
Code:
class Hello{
	public static void main(String args[]){
		System.out.println("Hello!");
	}
}
Executing this gives me no errors:
Code:
gcj -c -g -O  Hello.java
Executing this gives me the following error:
Code:
java Hello
Exception in thread "main" java.lang.NoClassDefFoundError: Hello
Any ideas on what I did wrong?
 
Old 04-07-2007, 06:24 PM   #4
hitest
Senior Member
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 4,141

Rep: Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523
Quote:
Originally Posted by angryfirelord
I am using runlevel 5 (running XFCE).
Do you mean run level 4? Slackware uses run level 4 as graphical mode. Debian would be run level 5:-)
 
Old 04-07-2007, 06:29 PM   #5
angryfirelord
Member
 
Registered: Dec 2005
Posts: 497

Original Poster
Rep: Reputation: 58
Quote:
Originally Posted by hitest
Do you mean run level 4? Slackware uses run level 4 as graphical mode. Debian would be run level 5:-)
D'hoh!
So what's the difference between runlevels 4 & 5?
 
Old 04-07-2007, 08:58 PM   #6
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Read the SlackBook that came with the DVD/CD.
Or
http://www.slackbook.org/
 
Old 04-08-2007, 10:14 AM   #7
hitest
Senior Member
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 4,141

Rep: Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523
Smile

Quote:
Originally Posted by angryfirelord
D'hoh!
So what's the difference between runlevels 4 & 5?
Slackware uses runlevel 1 for maintenance, as on other Linux distributions; runlevels 2, 3 and 5 identically configured for a console (with all services active); and runlevel 4 adds the X Window System.

* 0 - Halt
* 1 - Single
* 2 - Full multi-user NO display manager
* 3 - Full multi-user NO display manager
* 4 - Full multi-user with display manager (GUI)
* 5 - Not used/User definable
* 6 - Reboot

I copied the information from this article:

Runlevels
 
  


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
correct @INC path not detected by web browser mfitzpat Linux - Software 1 03-30-2006 07:25 PM
which is the correct directory path? verbatim Programming 1 04-24-2005 11:22 PM
adding java jdk to path snecklifter Linux - Newbie 4 11-01-2004 02:58 PM
Adding the correct installation path mynameisjoe Linux - Newbie 4 05-11-2004 10:26 AM
please tell me if my path statement is correct on RH 7.3 ergo_sum Linux - Newbie 9 12-12-2003 11:41 PM


All times are GMT -5. The time now is 08:21 PM.

Main Menu
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