Click to See Complete Forum and Search --> : Jdk 1.3 installation blues...


Marcel2008
02-22-2001, 06:26 PM
I installed jdk 1.3 from sun.
However only javac works! Running java or appletviewer does nothing...
I tried installing the rpm as well as the tarballs. But these give me the same result.
I can only run javac. What am i missing here?
:confused:

cme
02-22-2001, 07:41 PM
what does it say when you type which java?

I have this on my box as well. I've been using it for about a month and it runs like a champ...

Marcel2008
02-22-2001, 07:52 PM
it says:
/usr/bin/which: no java in xxxxxx
(where xxxx is my path)

this is what i do:
cd /usr/java/jdk1.3/bin
./javac => works ok
./java => does nothing!
./appletviewer => does nothing!

I use Red Hat Fisher (7.09 Beta).

:confused:

Dru Lee Parsec
02-22-2001, 08:05 PM
That's because java and appletviewer require command line arguments. Go to my Java installation Newbie Help File and it will show you how to write a Hello World program in java.

Let's say that the class and file name are HelloWorld. So your file would be

HelloWorld.java

TO compile it you type

javac HelloWorld.java

This will create a file called HelloWorld.class You then type

java HelloWorld

and your program will run (notice that I did NOT add the .class to the end)

So java and appletviewer are doing exactly what they are suppose to do. They run teh program you're telling it to run. Since you're not giving it a program name then it does nothing.

Marcel2008
02-23-2001, 06:07 AM
Tried it but doesn't work.
I don't understand what's wrong.
I can compile an applet, but running an appletviewer doesn't work. I have programmed in java quite a lot, so it should work.
Is this a bug in red hat or something?
What distro's do you use?

cme
02-23-2001, 09:48 AM
I haven't looked at Dru's page, but he knows what's up...

I added the path to my .profile file in my home directory, which means every time I open a terminial and want to use java then I have to type source ~/.profile to set the PATH. Maybe something to look at. I am at work now and not on a linux machine. Sorry... :(