File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Problem Installing j2sdk on linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Problem Installing j2sdk on linux" Watch "Problem Installing j2sdk on linux" New topic
Author

Problem Installing j2sdk on linux

Ross Gayle
Greenhorn

Joined: Jan 17, 2004
Posts: 14
I keep getting this error message when installing j2sdk binary on linux," The installer is unable to run in graphical mode. Try running the installer with the -console or -silent flag ". I tried installation notes on the java.sun.com website, but it does not discuss this problem. any help will be greatly appreciated.
thx in advance...
-R0ss.
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
j2sdk doesn't use graphic installer. Did you download the bin or rpm version of jdk?
Ross Gayle
Greenhorn

Joined: Jan 17, 2004
Posts: 14
I downloaded the bin version.
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Ross, can you post the actual error message?
Ross Gayle
Greenhorn

Joined: Jan 17, 2004
Posts: 14
"The installer is unable to run in graphical mode. Try running the installer with the -console or -silent flag "
this is what it says after some intial steps. from which shell do you actually install the sdk?
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Just out of curiousity, did you do this thru a shell, or you use some kind of file manager and double-clicked?
Here is the basic steps:
1. open up xterm or any shell prompt
2. copy jdk***.bin to the directory you wanna install (usually /usr/local/bin, or /usr/bin)
3. chmod +x jdk***.bin (make it executable)
4. on command prompt: ./jdk***.bin
and it should give you the install process.
Ross Gayle
Greenhorn

Joined: Jan 17, 2004
Posts: 14
did all those steps . after i hit ./jdk***.bin , it starts installing, takes a few steps( lines of dots on the screen ) , then it gives that error and stops. usually i use secure shell to login .I found a help page with the same problem on sun website, but had to leave that day and closed it ,confident that i can find it again. i tried after 3 days, it was removed. i remember it discussed a soln. wherein we have to change to csh and some other stuff. I am a novice to linux , just started using it at my office where i am interning , so any help will be greatly appreciated....
-R0ss.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

You've clearly got a JDK version that includes an X/Windows based installer. If you're ssh-ing in, then the installer isn't finding an X server to talk to. You need to be running one on your desktop machine (which is what?) and your login shell needs to have the DISPLAY environment variable set.
If the local machine is Linux too, then all you have to do is use the -X switch to SSH when you connect; this will set up X forwarding automatically.
If you have no idea whatsoever what I'm talking about, and/or if you're running Windows, this is going to be tougher. Before I open my mouth, let us know your situation in more detail.
Note that this might seem like a lot of nonsense, but if you're going to develop on this remote machine, you're likely going to want to see a GUI thrown up by the remote machine, so this will be necessary.


[Jess in Action][AskingGoodQuestions]
Adrian Yan
Ranch Hand

Joined: Oct 02, 2000
Posts: 688
Ernest, correct me if I'm out. Are you saying Ross downloaded the Netbean bundled version of JDK?
Ross, if you do need to use X (swing development, etc), you have to install cygwin onto your window box, and do ssh -X user@remote, the -X allows X-forwarding.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Originally posted by Adrian Yan:
Ernest, correct me if I'm out. Are you saying Ross downloaded the Netbean bundled version of JDK?

That's what I'm thinking.
michael bradly
Ranch Hand

Joined: Oct 06, 2000
Posts: 112
I seem to be having a bit of trouble with the installation myself.
I downloaded
j2re-1_4_2_03-linux-i586-rpm.bin
j2sdk-1_4_2_03-linux-i586-rpm.bin
Then I chmoded x and ran them to get the rpm's
Then I chmoded and ran the rpm's by rpm -iv j2skd-1_4_2_03-linux-i586.rpm and I had an error, so I deleted the /java folder (perhaps a mistake, I didn't use the uninstall command).
Now when I try I'm getting this response
rpm -iv j2re-1_4_2_03-linux-i586.rpm
Preparing packages for installation...
package j2re-1.4.2_03-fcs is already installed
Anything simple to do to correct this?
Thanks, Michael
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Add the --replacepkgs switch to the rpm command line:
rpm -iv --replacepkgs j2re-1_4_2_03-linux-i586.rpm
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem Installing j2sdk on linux