Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

java linux?
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2366
Location: wigan

PostPosted: Sat Jul 02, 2005 10:28 pm    Post subject: java linux? Reply with quote

can anyone recomend a good java download for mandriva? i have buggered about with one i downloaded this morning Rolling Eyes but when i run ./sdk....etc it says permission denied even if i'm logged in as root Confused that was both -rpm.bin and .bin neither would install
if it isn't possible with mandriva that would be fine as i am quite fed up Crying or Very sad
paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
apoth



Joined: Sun Jun 19, 2005 1:08 pm
Posts: 8

PostPosted: Sat Jul 02, 2005 11:19 pm    Post subject: RE: java linux? Reply with quote

Go here.
Presumably select "Download JDK 5.0 Update 4".
Click accept and then choose the linux .bin
# chmod 755 jdk-1_5_0_04-linux-i586.bin
# ./jdk-1_5_0_04-linux-i586.bin

Should be as simple as that.
Back to top
View user's profile Send private message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2366
Location: wigan

PostPosted: Sun Jul 03, 2005 11:04 am    Post subject: Reply with quote

that's what i tried but it just keeps saying permission denied Confused
paul
edit i have now managed to install an older version and will try and use the update 1.5 later as it says it is busy and come back later Rolling Eyes
thanks
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7473
Location: Midlands, UK

PostPosted: Sun Jul 03, 2005 12:13 pm    Post subject: Reply with quote

Just think, if you weren't such a tight-fisted so-and-so you could have joined MandrivaClub and installed the official rpms easily Razz
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2366
Location: wigan

PostPosted: Sun Jul 03, 2005 12:33 pm    Post subject: Reply with quote

that would be correct Very Happy
how do you change the environmental variables to put java 1-5 onto the end of it i have looked at sun and they say that you have to do it but not how Confused as i cannot use javac because it says
Code:
bash: javac: command not found
i have installed it ok but cannot find where the env vars are Confused
any help would be appreciated Very Happy
paul
update i now have a working java Very Happy whooohooo!!!! yip yip yahooo!!
thanks for all you input Very Happy does the mandriva club tell you about env. vars?
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7473
Location: Midlands, UK

PostPosted: Sun Jul 03, 2005 1:03 pm    Post subject: Reply with quote

No idea, but they do have a help forum where people will probably tell "that's a java problem, try a java forum" Laughing

If by env vars, you mean the output of the command env, and if the bit you are looking for is your $PATH, you can modify your default path with the export command, indeed many of these variables can be modified on a session-only or permanent basis. Have a look at your .bash_profile and .bashrc in your home directory, I forget if Mandriva sets both of these or not.

Customising the environment might make a good article for the magazine.
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2366
Location: wigan

PostPosted: Sun Jul 03, 2005 1:19 pm    Post subject: Reply with quote

if i use
Code:
PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
JAVA_HOME=/usr/java/j2skd1.4.2_04
export PATH

for each session then i can use java but i thought this would alter the environmental variables permanently as it does in windows? so that you can envoke the interpreter with javac and run your progs with java filename can you not alter them permanently?
paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7473
Location: Midlands, UK

PostPosted: Sun Jul 03, 2005 1:46 pm    Post subject: Reply with quote

If you do:
rhakios@pythia:~> env | grep -i java
JRE_HOME=/usr/lib/jvm/java/jre
JAVA_BINDIR=/usr/lib/jvm/java/bin
JAVA_HOME=/usr/lib/jvm/java
SDK_HOME=/usr/lib/jvm/java
JDK_HOME=/usr/lib/jvm/java
JAVA_ROOT=/usr/lib/jvm/java

do you get all that or not?

Exporting extra variables to the $PATH is quite easy, for example:

export PATH=$PATH:/your/new/path

will add /yor/new/path to your $PATH without overwriting the original. If you want to make other permanent changes to your environment, then put them in your ~.bashrc
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2366
Location: wigan

PostPosted: Sun Jul 03, 2005 1:51 pm    Post subject: Reply with quote

i get what you have written but are those just for one session?
i would want it so that i just open konsole and could then start javaring, what i don't get is ~.bashrc?
paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7473
Location: Midlands, UK

PostPosted: Sun Jul 03, 2005 1:54 pm    Post subject: Reply with quote

In your home directory, there should be a hidden file .bashrc, all files with a "." in front are hidden by default. You can set variables for your environment by modifying your .bashrc, remember that your log in is essentially X executed in a bash session (unless you have a chosen a different default shell of course).
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2366
Location: wigan

PostPosted: Wed Jul 13, 2005 9:36 pm    Post subject: Reply with quote

hello i have installed java successfully!!(not had access to linux through modem probs Rolling Eyes )
i hava installed it in /java and it all went ok
however when i try to save a java program to this dir it says cannot write to it check that i have enough permissions and that i have enough disk space?
i have the majority of space for /home(about 66gig) and the rest are shared,but i cannot install it in home as it must be an empty directory Confused
any thoughts?
paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7473
Location: Midlands, UK

PostPosted: Wed Jul 13, 2005 11:26 pm    Post subject: Reply with quote

If /java is (as your formatting suggests) mounted directly beneath the root partition, then you will probably not have permission to write to it.
The rest of your post doesn't make sense, "it", what is "it"? Java or your program.

If you wish to write to /java then you can change the permissions to suit, either make it world writable (bad idea), or change the owner (somewhat better idea). For the latter, you might use something like:

chown -R 1sf (troll) /java (should 1sf (troll) happen to be your user name).
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2366
Location: wigan

PostPosted: Thu Jul 14, 2005 7:09 am    Post subject: Reply with quote

sorry it is bash Embarassed
when i type in chown -R paul/java at command line as root the display says
Quote:
chown: too few arguments

paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
Nigel
LXF regular


Joined: Fri Apr 08, 2005 9:03 pm
Posts: 1141
Location: Gloucestershire, UK

PostPosted: Thu Jul 14, 2005 9:23 am    Post subject: Reply with quote

there should be a space between "paul" and "/java"
_________________
Hope this helps,

Nigel.
Back to top
View user's profile Send private message
1slipperyfish
Forum Jester


Joined: Mon May 09, 2005 3:52 pm
Posts: 2366
Location: wigan

PostPosted: Thu Jul 14, 2005 5:37 pm    Post subject: Reply with quote

thanks nigel that does work Very Happy now i am back to my orignal problem of when i try to use javac at command line to invoke the compiler i get
Code:
[paul@localhost java]$ javac hello.java
bash: javac: command not found

which was what i was previously asking about setting global variables(as you can in windows)
paul
_________________
i am a follower of the culture

Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast