Computing.Net > Forums > Programming > Need some help with java.

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Need some help with java.

Reply to Message Icon

Name: Mike
Date: June 21, 2002 at 08:09:26 Pacific
Comment:

Hi, I am having a little problem with java.
When I try to compile code I have to type the
whole path to the javac compiler is.

/usr/java/j2sdk1.4....you get the idea.

I tried looking in the java tutorial and the
box where this discuss this error the tell
me to go to the installation page for linux.
But their isn't anything there to help me out.
It just discuses the installation process.
Also, java runtime enviroment was installed
when I installed linux so that would explain
why I don't have to type in the path for 'java'
to. How do I get around this problem?

Thanks for any help.



Sponsored Link
Ads by Google

Response Number 1
Name: Sumit
Date: June 21, 2002 at 22:41:17 Pacific
Reply:

I am not sure about this but i will try to help you.
1) thing is that change the directory to which the java is installed &then in the bin directory & then try running the compiler.


0

Response Number 2
Name: faisals
Date: June 22, 2002 at 03:14:42 Pacific
Reply:

what you can do is to append /usr/java/jdk_whatever/bin to your PATH variable. Then you dont need to type whole path everytime. You can invoke compiler just by typing javac.
Now modifying path variable so that you dont have to set it everytime you reboot system is something specific to your system. I use Redhat 7.3 and there is a file name .bash_profile in my home directory. I can append that line to PATH variable there.
Basically you need to figure out where is your path variable stored

Faisal


0

Response Number 3
Name: Mike
Date: June 22, 2002 at 04:58:18 Pacific
Reply:

Thanks for the replies. I fiqured out one a
way from a page on the internet. What I do
is type this into my bashrc file

alias jc="/usr/java/j2sdk...rest of the path"

and then on the console al I have to do is
type this

jc program.java

I'll try looking for the bash_profile, I think
I saw it somewhere someday.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Need some help with java.

Need help with JAVA www.computing.net/answers/programming/need-help-with-java/4465.html

Need some Help with nachOS Project in .. www.computing.net/answers/programming/need-some-help-with-nachos-project-in-/1563.html

Help with making C++ Program www.computing.net/answers/programming/help-with-making-c-program/4217.html