LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-13-2011, 09:10 AM   #1
ramkumar652
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 0
java_home


sir , i have installed jdk1.60_23
i have created a directory named java in root's Home, jdk has installed in jdk1.60_23 directory in java
please suggest me how to set path to compile or run the java file ?
i did like this : export JAVA_HOME=/usr/bin/java/jdk1.60_23/bin
export PATH=$JAVA_HOME:/usr/bin/java/jdk1.60_23/bin

please suggest me how check the path has properly set or not ?
how and where create source file of java ?
how to compile and run the java source file ?
please suggest me soon.
 
Old 02-13-2011, 11:41 AM   #2
rahulkya
Member
 
Registered: Feb 2009
Location: New Delhi
Distribution: Linux mint,Ubuntu,Debian,RHEL 5,slackware 13.1, free BSD,solaris.
Posts: 186
Blog Entries: 3

Rep: Reputation: 33
Quote:
echo $PATH
to check what paths have been set..

create anywhere source files of java. and compile like this...

Quote:
javac javafilename.java
and run it like
Quote:
java javafilename
Remember that your shell shall be in the folder in which java source files are there.. check like this..
Quote:
pwd
and output will be..

filename.java

etc etc..
 
Old 02-13-2011, 11:50 AM   #3
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 1,800

Rep: Reputation: 620Reputation: 620Reputation: 620Reputation: 620Reputation: 620Reputation: 620
Java

You SHOULD have done something like the following:
JAVA_HOME=/usr/bin/java/jdk1.60_23/bin
PATH=${JAVA_HOME}:${PATH}
export JAVA_HOME PATH
# above will work with shell sh, ksh, bash, and a few others.

After executing these lines try
java -version

you should get the version return information.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] JAVA_HOME not defined tkmsr Linux - Software 1 08-01-2010 05:33 AM
[SOLVED] Where is JAVA_HOME in Linux imagine_me2 Linux - Newbie 4 07-29-2010 03:09 AM
setting JAVA_HOME yewint Linux - Newbie 1 12-30-2009 10:59 AM
JAVA_HOME Variable yea420 Linux - Software 6 08-29-2004 07:37 PM
JAVA_HOME and tomcat mbbender Linux - Software 5 07-07-2003 09:39 PM


All times are GMT -5. The time now is 04:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration