| View previous topic :: View next topic |
| Author |
Message |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2366 Location: wigan
|
Posted: Sat Jul 02, 2005 10:28 pm Post subject: java linux? |
|
|
can anyone recomend a good java download for mandriva? i have buggered about with one i downloaded this morning but when i run ./sdk....etc it says permission denied even if i'm logged in as root 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
paul _________________ i am a follower of the culture
 |
|
| Back to top |
|
 |
apoth
Joined: Sun Jun 19, 2005 1:08 pm Posts: 8
|
Posted: Sat Jul 02, 2005 11:19 pm Post subject: RE: java linux? |
|
|
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 |
|
 |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2366 Location: wigan
|
Posted: Sun Jul 03, 2005 11:04 am Post subject: |
|
|
that's what i tried but it just keeps saying permission denied
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
thanks _________________ i am a follower of the culture
 |
|
| Back to top |
|
 |
Rhakios Moderator

Joined: Thu Apr 07, 2005 12:18 am Posts: 7473 Location: Midlands, UK
|
Posted: Sun Jul 03, 2005 12:13 pm Post subject: |
|
|
Just think, if you weren't such a tight-fisted so-and-so you could have joined MandrivaClub and installed the official rpms easily  _________________ Bye, Rhakios |
|
| Back to top |
|
 |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2366 Location: wigan
|
Posted: Sun Jul 03, 2005 12:33 pm Post subject: |
|
|
that would be correct
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 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
any help would be appreciated
paul
update i now have a working java whooohooo!!!! yip yip yahooo!!
thanks for all you input does the mandriva club tell you about env. vars? _________________ i am a follower of the culture
 |
|
| Back to top |
|
 |
Rhakios Moderator

Joined: Thu Apr 07, 2005 12:18 am Posts: 7473 Location: Midlands, UK
|
Posted: Sun Jul 03, 2005 1:03 pm Post subject: |
|
|
No idea, but they do have a help forum where people will probably tell "that's a java problem, try a java forum"
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 |
|
 |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2366 Location: wigan
|
Posted: Sun Jul 03, 2005 1:19 pm Post subject: |
|
|
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 |
|
 |
Rhakios Moderator

Joined: Thu Apr 07, 2005 12:18 am Posts: 7473 Location: Midlands, UK
|
Posted: Sun Jul 03, 2005 1:46 pm Post subject: |
|
|
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 |
|
 |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2366 Location: wigan
|
Posted: Sun Jul 03, 2005 1:51 pm Post subject: |
|
|
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 |
|
 |
Rhakios Moderator

Joined: Thu Apr 07, 2005 12:18 am Posts: 7473 Location: Midlands, UK
|
Posted: Sun Jul 03, 2005 1:54 pm Post subject: |
|
|
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 |
|
 |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2366 Location: wigan
|
Posted: Wed Jul 13, 2005 9:36 pm Post subject: |
|
|
hello i have installed java successfully!!(not had access to linux through modem probs )
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
any thoughts?
paul _________________ i am a follower of the culture
 |
|
| Back to top |
|
 |
Rhakios Moderator

Joined: Thu Apr 07, 2005 12:18 am Posts: 7473 Location: Midlands, UK
|
Posted: Wed Jul 13, 2005 11:26 pm Post subject: |
|
|
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 |
|
 |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2366 Location: wigan
|
Posted: Thu Jul 14, 2005 7:09 am Post subject: |
|
|
sorry it is bash
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 |
|
 |
Nigel LXF regular

Joined: Fri Apr 08, 2005 9:03 pm Posts: 1141 Location: Gloucestershire, UK
|
Posted: Thu Jul 14, 2005 9:23 am Post subject: |
|
|
there should be a space between "paul" and "/java" _________________ Hope this helps,
Nigel. |
|
| Back to top |
|
 |
1slipperyfish Forum Jester

Joined: Mon May 09, 2005 3:52 pm Posts: 2366 Location: wigan
|
Posted: Thu Jul 14, 2005 5:37 pm Post subject: |
|
|
thanks nigel that does work 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 previous topic :: View next topic |
|