paths

This is a discussion about paths in the Everything Linux category; how can i execute binaries even if i am not within the folder that contained the binary? just like my java, ican only execute java under the folder j2sdk. .

Everything Linux 1800 This topic was started by , . Last reply by ,


data/avatar/default/avatar26.webp

151 Posts
Location -
Joined 2003-12-23
how can i execute binaries even if i am not within the folder that contained the binary?
just like my java, ican only execute java under the folder j2sdk.

Participate in our website and join the conversation

You already have an account on our website? To log in, use the link provided below.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This subject has been archived. New comments and votes cannot be submitted.
Jun 26
Created
Jun 28
Last Response
0
Likes
1 minute
Read Time
User User User
Users

Responses to this topic


data/avatar/default/avatar04.webp

1678 Posts
Location -
Joined 2003-09-27
I'm not real informed on java, but I think you'd have to make a symbolic link from the java executable to /usr/bin. Tell me more. Is there a program or files that open with java, as in:
 
java jarvesfile.xxx
 
or something?
 
If that is the case try this. Make a symlink as root like so:
 
ln -s /opt/j2sdk1.4.2_04/bin/java /usr/bin/java [enter]
 
That's how I'd do it on mine, but your java location and the version may differ. Just change it accordingly.
 
It won't hurt anything if this doen't do what you want.
 
 

data/avatar/default/avatar26.webp

151 Posts
Location -
Joined 2003-12-23
OP
is it similar to windows' that you can execute any file as long as it is included in the path. In windows you can change the path so windows will automatically execute the executable file.

data/avatar/default/avatar05.webp

214 Posts
Location -
Joined 2002-10-05
Yes, it is similar. That's why, as Dapper Dan said, when you make a simbolic link that points to for example /usr/bin, you'll be able to execute your java class files simply by typing java class_file.