LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-29-2010, 05:50 PM   #1
V'Lar
LQ Newbie
 
Registered: Nov 2010
Posts: 1

Rep: Reputation: 0
Trying to set classpath and path for my jdk ubuntu10.10 to complie from anywhere


Hello everyone V'lar here, am new to the forum. I am trying to compile my Java Programs from any directory. I know it has something to do with the path and classpath. Someone please assist, thank you in advance?
 
Old 11-30-2010, 01:44 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Welcome to LQ! As you are asking about Java programming, I have moved your thread to the Programming forum.
 
Old 12-04-2010, 02:40 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Compiling with ' javac ' :
1) Add 'Canonical-partners' to "Software sources" in Synaptic" :
Settings → Archives : 'Software sources' → Other Software.

2) Refresh Synaptic with the "Refresh button"
or run : sudo apt-get update
3) Install 'sun-java6-jdk'
4) Use the command : 'sudo update-alternatives --config java
... to check, that /usr/lib/jvm/java-6-sun/jre/bin/java is used.
5) Run 'javac -version' : The reply should be : javac 1.6.0_22

Setting a classpath : I think, it is used only, when you have
some files in a 'non standard path'.

Compiling with ant : '/usr/bin/ant' is provided by the package 'ant'.
..
 
  


Reply



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
problem in set the $PATH and $CLASSPATH in my .bashrc htamayo Linux - Newbie 5 04-10-2009 06:43 AM
How to set PATH and CLASSPATH environment variables bronko Linux - Newbie 2 12-20-2003 11:13 AM
set up path,classpath in linux(slaware9) for java Manjula.S Linux - Software 5 10-06-2003 11:38 PM
How to set classpath for jdk jolly Linux - Software 5 05-01-2003 08:48 AM
How to set classpath for jdk jolly Linux - Software 4 05-01-2003 08:24 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:26 PM.

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
Open Source Consulting | Domain Registration