Installing Java2 RE from .bin
I chmod' it ran it and everything....it printed on the screen a bunch of inflating creating etc etc.....now what do i do...i tried a search....but couldn't find it......i need java cause i wish to try this program http://www.tanveer.freeservers.com/p...shDownload.htm
Is there another script to execute after this or something? Garry :D |
Oh by the way i found a zip file which was created after all the inflating extracting stuff named javaws-1_2_0_01-linux-i586-i.zip i extracted it and it had a script file 'install.sh' i ran that and it asked this and i don't know where to go on: (above was all that licensing agreement stuff)
Code:
Do you agree to the above license terms? [yes or no] Garry :D |
Whatis that program?
Anyway, which version do you have? It should have deflated into the directory into which it was. So if: Java.whatever.bin was in: /home/files/Java.whatever.bin and you ran it from there, it should have decompressed there, and now you should move the decompressed folder to /usr/loca/bin/java with: mv /path/to/decompressed/folder /usr/loca/bin/java And set your $PATH. What distro? Cool |
Is the folder named 'j2re1.4.1_01' i'm running Mandrake 8.2...
Oh and i have heard this $PATH thing alot and i have an idea what it is, but how would i go on setting it? Garry :D |
Oh and it's some graphic program which i found on tucows i found it interesting and wanted to try it, and it said i needed java, so i thought might aswell install it :)
Garry :D |
Cool...
You might have either a .bash_profile in your ~ directory to edit your $PATH or you might have /etc/profile to edit your path, either one is fine. As for the folder, yes it probably is, so here is the command to move it (remember you must be root and that you are in the directory that this file exists): mv j2re1.4.1_01 /usr/local/bin/java Just like that, you can copy and paste if you'd like. Some people like to move the folder and have the name remain the same, no problems there, you will just have to follow with a symlink to /usr/local/bin/java afterwards, or adjust what you place in your $PATH to show the j2re1.4.1_01 as your java folder. Oh and 1 more thing, you will actually want to add the bin subdirectory in the j2re1.4.1_01 folder. SO... Enter the j2re1.4.1_01 folder, make sure you have a /bin directory there, if so, and if you choose to use my moving option then add this to your $PATH: /usr/loca/bin/java/bin Cool |
I'm sorry MasterC but i kinda lost you after the move thing ;)
I moved the folder via command to /usr/local/bin/java, now i am lost... very very sorry hehe.... Garry :D |
he he he, no problem, sometimes I move fast if I think I am boring you with details...
Ok, so you have it moved then, cool. Now see if you have either (or both) /etc/profile AND/OR ~/.bash_profile You can just look for them, no need to do a search. Cool |
Yep got em both...
Garry :D |
Ok so let's go for /etc/profile as it will work for all users that way...
Add the bold to your similar looking line: Code:
# Set the default system $PATH: /usr/local/bin/java/bin Cool |
This is my profile....i don't know where to put it, sorry....
Code:
# /etc/profile -*- Mode: shell-script -*- |
No wait i know where to put it now :p sorry again....once i put it in...how can i test if java works?
|
Ok very very sorry, i know where it goes, but i don't know how to insert it....geeeez i should concentrate more...
|
No problem, it's not a biggie ;)
Open up a text editor, and place the following line in your file: PATH="/usr/local/bin/java/bin" Just below: if [ "$UID" -ge 500 ] && ! echo ${PATH} |grep -q /usr/games ; then export PATH=$PATH:/usr/games fi Just under the fi place the line I have above, just as it is. Then post what you did just to make sure it's all ok. To paste, just highlight the text here, and click the middle mouse button on the area to paste into. Cool |
Ok done..here we go....
Code:
# /etc/profile -*- Mode: shell-script -*- |
Looks good, I'd put a space between fi and PATH but that's just for eye pleasure, not anything more.
Anyway, cool. Now, you need to source the file so open up a terminal and type: source /etc/profile And that should be it. Now you should have java installed. Cool |
Hmmm after i was getting happy, this happened....
Code:
[root@localhost etc]# source /etc/profile |
I would simply ignore that for now...
|
So everything is cool?, i just run java by typing 'java'? and also in the java directory what is that install script for?
Garry :D |
Oh, i just remembered, that install script was from a .zip file in the java directory, i don't think it matters then....ok thanks alot MasterC!!!....just one more thing...what was thet stuff when i did a source /etc/profile
Garry :D |
Everything should be cool now yes.
What script? Post the conents of your /usr/local/bin/java directory, and also the contents of your /usr/local/bin/java/bin directory. Cool |
I believe it was setting variables for your terminal. Shouldn't matter as far as all this is going, and actually shouldn't matter overall, as it's just for things that are probably setup somewhere else.
|
Whoa, I never saw that src.zip file before, now I am curious. I unzipped elsewhere and am wondering what it's for. Looks like good stuff :confused:
If you find out, let me know, cause that looks important maybe but I haven't had any problems with java on my system :) Cool |
Geeeez, i love Linux but sometimes it pisses me off just trying to get programs to run...after all that time when i try running the program this prints:
Code:
[root@localhost JPhotoBrush]# java JPhotoBrush.jar Ok i can't show the contents of the folder...because ls or dir couldn't be found....heres proof...unless i'm typing them wrong lol... Code:
[root@localhost java]# ls |
Ok, so I just decided to unzip it in the java directory, it didn't mess with LimeWire, so I guess it didn't do any harm...
Hmm, I wonder if it's mentioned in the README or INSTALL files? Anyway, any luck? Cool |
logout of root and backin
And also source your bash_profile: source ~/.bash_profile Ok, so looks like you might need to specify it elsewhere, ok do this: echo $PATH If you don't see /usr/local/bin/java/bin Then our efforts above in /etc/profile didn't work. You will instead need to place that into your bash_profile (and now I am gun-shy, so post the contents of your bash_profile and your bashrc file so I know I am telling you the correct file) And you will also want to remove the entry we made in /etc/profile for java path. |
Ok ls works, now i just want to know why are we taking out the stuff from profile and now using the bash profile? Java is working i think...it's just that program? is it?
|
If java is working now, then that's cool. But no, from that error message it reads as java's problem, not the programs.
Now that ls is working, post the contents. Cool |
Oh and 1 more thing, to execute that file it's:
java -jar JPhotoBrush.jar Don't forget the -jar after java Cool |
Code:
[root@localhost java]# ls Code:
[root@localhost bin]# ls Garry |
geeeez i forgot the -jar .....and umm java doesnt work now.....whys that...since i logged out....i havent touched profile or bash_profile yet...
Garry |
ha ha ha, that's the contents of your /bin directory rather than /usr/local/bin/java/bin
Ok, so, it would appear that the entry in /etc/profile isn't working for whatever reason. Cool |
Wrong bin folder sorry..
Code:
[root@localhost bin]# ls |
So would that mean i have to put it in my bash_profile one?
Yeh i just realised it while reading through the files in it hahaha...:) Garry |
I'm not sure if this will work i'm still a newbie, but can i make like a link to java in /usr/local/bin/java from /sbin or wherever program commands are installed...would that work?
Garry |
Some people do that, but I just dug up some good info I used to give, here's the page:
http://www.mandrakeuser.org/docs/utils/ujava.html So follow this part of those instructions: Quote:
To further answer your question about symlinking it... Yes, people do it, and I have done it before, but I suggest trying to get it accomplished this way first rather, and resort to that as a last ditch effort. BTW, I tried that program, it's kinda cool, but sorta very basic, especially compared to gimp or somthing like it. Java programs usually seem to hog resources and don't move very quickly. Anyway, let's keep going because it's good to have java installed anyway. Cool |
And... You will need to modify those /paths/up/there to fit your needs. Basically don't copy and paste cause it won't work.
Cool |
Ok i think you do need to shed some light on this....i don't know where to start and whats this kaffe stuff lol
And yeh i thought that i might aswell install Java too... Garry |
kaffe is another implementation of java I believe, but I guess a lot of programs don't work with it.
Ok, so I am thinking you probably don't need to worry about the first step (maybe, but I don't know if kaffe conflicts, or even if you have it installed, might be best to uninstall it anyway) Anyway, so I'll skip down to where you need to do stuff: We are already here: Quote:
Create a file called 'java.sh' as 'root' in '/etc/profile.d' containing these lines: create the file java.sh in the folder /etc/profile.d using any text editor Add these lines to that new file JAVA_HOME=/usr/local/bin/java export JAVA_HOME PATH=$PATH:$JAVA_HOME/bin export PATH Save and exit, and now we need to make this file executable so: chmod +x /etc/profile.d/java.sh Ok that's what you need to do. I put pointers in there for ya :D Cool |
NOTE: I have already edited the lines of that file for you, so you can copy and paste from my "pointer" example the lines for java.sh that you are creating.
Cool |
Ok thanks MasterC i will try that STRAIGHT after dinner....if i have any more problems and your not on, it's ok theres no rush :)
Thanks for your help buddy! Garry :D |
No problem buddy. Have a good dinner, I am going to bed ;)
Cool |
Ok i did all that.....now what do i have to do?? When i type 'java' the command cannot be found....do i add all that stuff in profile again?
Garry :D |
Actually it worked i had to open a new console...now i'm gonna try the program...
Garry :D Thanks MasterC! i know your in bed hahaha |
Hmmm how could i run this without going to console and typing java -jar bla bla all the time???
Garry :D |
You could create a nice, short little script that passes all the parameters for you. If you're running KDE or Gnome, you could also just create a 'link' to it on your desktop with all the lovely parameters in that.
And how on earth did you get into such trouble installing J2RE? I did something that I don't normally do... I went and got the J2RE-something.rpm.bin. Ran it and it self-expanded to an RPM file. Installed the RPM file and all is well! £0.02 |
:) Thymox, look who was helping him :D Anytime you see my name attached to something, it can only lead to problems ;)
Yes, the script would looks something like: #!/bin/bash #This is for the JPhotoBrush java program: cd /to/your/directory/with/JPhotoBrush.jar java -jar JPhotoBrush.jar #end script And copy and paste that into any text editor, edit the path to your program, save the file as JPhotoBrush (or whatever you want) and then: chmod +x JPhotoBrush And now you can move that wherever you want, and if you put it in your PATH (maybe in /usr/bin) then you can execute it my just typing JPhotoBrush I am no bash expert, but I think that's right. Check around first, or ask someone to take a look at it. Glad you got it working btw, how do you like the program? Cool |
Thanks alot MasterC....
Yeh the program is ok..i really like the blend effect it's got with it hehehe i don't know how to do that in Gimp.. Garry :D |
For future reference if you need more stuff to do with java -jar just create an alias jjar='java -jar' for instance, you know where to put it right? ~/.bashrc is a good place for aliases, then whenever there is a jar archive to be delt with java -jar just type in console jjar archive.jar and volia!
|
ok cool, but yeh another question,when i made that script and put it in profile.d that should make it work for ALL users right? what happens if i want root and other users to run Java? and that program...cause it only runs for 'gt'
Garry :D |
All times are GMT -5. The time now is 11:02 PM. |