Hi guys ,
This is the first time i m running java application inside linux.
i have installed jdk-6u20-linux-i586-rpm.bin jre-6u20-linux-i586-rpm.bin in my linux machine.
and set JAVA_HOME and JRE_HOME variables respectively.
I have created a little java program helloworld.java
I m able to compile the program by doing javac helloworld.java
but not able to run the program by doing java helloworld.
It is giving me following error.
whenever i type java in command prompt it give me following output. M i missing anything.
I think /usr/bin/java is not poited to /usr/java/jdk1.6.0_20/bin/java
It is pointed to some other java (which i m not sure).
How do i change this pointing?
If i do the changes will it have any serious impact ?
Last edited by pludi; 05-06-2010 at 02:02 AM..
Reason: [code] (#), not [quote]
Now its working.
Here is what i have done(Correct me if it is wrong)
i have fired "which java" command.
from the output i have got the location of java file
i changed the java file location from /usr/bin
to /usr/bin/javabackup (created new folder named javabackup).
added /usr/java/jdk<versionname>/bin to path using.
export PATH=$PATH:/usr/java/jdk1.6.0_20/bin/
Hi All,
How can i run a single command on multiple servers with or without giving credentials.
I have a file(servers.txt) which has got list of servers and i want to run a command lsb_release -dr on all these servers and get output of those servers against each server.
I tried below code... (9 Replies)
if ]; then
echo "successssssssssssssssssss"
$filename = "<font color='red'>$i</font>"
else
echo "failureeeeeeeeeeeeeeeeeeeee"
$filename = "$i"
fi;
I'm just trying to see is this - read a file name and highlight... (2 Replies)
What is the trick to get a java program to run and compile? I can't even get a basic skeleton to run and compile. What packages do I need? I figured the java-gcj and gcc-java packages was enough. Do I need any other packages?
I thought I had to do this and it would work but its not.
javac... (1 Reply)
Hello,
I have a project directory in /home/researcher
I have in my project/src three packages:A (contains the main class), B and C and I have 2 jar-files file1.jar file2.jar files in the project/my-jars
In Class A I import other classes from the other packages
I compiled as follows:... (4 Replies)
Hi everyone, I have an issue with a project of mine. I have to run a program on a terminal which requires to be logged in as su to have it run it. Given that I'm having problem to use expect to give the password I'd like to change the privilege of that program from SU to normal user ( I have the SU... (13 Replies)
Hi,
I am unable to run a simple C++ threaded program on the AIX 5.3 platform. It says
exec(): 0509-036 Cannot load program ./sendClient because of the following errors:
rtld: 0712-001 Symbol __pthread was referenced
from module sendClient(), but a runtime definition
of the... (6 Replies)
I am entirely new to shell scripting and would like to create a script to execute a java program called Main. I've already compiled it and placed the .java and .class files at /root/javaTest. Next I made a shell script that simply contained: java /root/javaTest/Main . I made the script... (2 Replies)
Hello all sorry didnt know where to post it
i compiled simple program that using "System.getProperty("user.dir");"
now i compiled the program under directory foo and and its running great when i do "java myapp"
i included this directory in the $PATH env variable so i could see it fro any where... (1 Reply)
I am relatively new to *nix and have set up a small home network with a red hat server, what i would like to do is write a small script to check to see if a computer is connected by using the ip address of the computer. can get the ping to return but cant get the echo line working. the output i... (3 Replies)
Hi,
I have the following problem. I have 2 programs, a java program and a c++ program. These 2 programs have to communicate with each other in full duplex mode. I want to use pipes for this communication. So when the c++ program pust something on the stdout the java program must be able to read... (4 Replies)