LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Java Programming: Java Runtime Environment not found when trying to compile (https://www.linuxquestions.org/questions/linux-software-2/java-programming-java-runtime-environment-not-found-when-trying-to-compile-207287/)

murbz 07-20-2004 02:09 AM

Java Programming: Java Runtime Environment not found when trying to compile
 
Hey Guys!

Yeah im back with another little problem. I previously had the problem with Java Virtual Machine. I got some advice and help from you guys and changed my .bash_profile with PATHS and stuff. Now i encoutered another problem. I just downlaopded a 90mb file from Java Sun Microsystems , a SDK with NetBeans IDE 3.6. Now ive installed the NetBean IDE program and is working sweet. however my "Beginning Programming for Dummies" wants me to use a text editor instead. ok im fine with that, following the instructions in the book, chapter-by-chapter. Then trying to compile the program that ive made is another story. I can't seem to use the 'javac' command. It prompts

"Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment."

how can i sort this problem out guys? If someone could help me, that would be awsome.
Thanx again...

... MURBZ


Ohh: Heres a copy of my ".bash_profile" if it helps
>
---------------------------------------------------------------------------
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

path=PATH:/usr/j2re1.3.1/bin/
export PATH
unset USERNAME
CLASSPATH=/usr/java/lib
export CLASSPATH
JAVA_HOME=/usr/local/java
export JAVA_HOME
PATH=/bin:$PATH; ---> from the book instructions exactly
export PATH --->
CLASSPATH=.; export CLASSPATH --->

------------------------------------------------------------------------------

Mega Man X 07-20-2004 02:15 AM

I think that error is because you've installed JRE, which does not include the compiler (javac). You could:

1 - download and install J2SDK. Since J2SDK includes the RE, you might want to remove the java runtime environment and stick with J2SDK instead, or:

2 - In the directory where netbeans is installed, you will find "javac" compiler insider a /bin directory. Simply make a link:

ln -s /wherever_netbeans_is/bin/javac /usr/bin/javac

Good luck!

lgeood03 03-26-2009 03:04 AM

Java Error
 
Hi Mega Man,

what is the extension name for javac compiler.. try to search it and found only javac.jar only.

Do I need to install or run this file?

What do you mean about "Simply make a link"


Thanks,

lgeood03





Quote:

Originally Posted by Mega Man X (Post 1057743)
I think that error is because you've installed JRE, which does not include the compiler (javac). You could:

1 - download and install J2SDK. Since J2SDK includes the RE, you might want to remove the java runtime environment and stick with J2SDK instead, or:

2 - In the directory where netbeans is installed, you will find "javac" compiler insider a /bin directory. Simply make a link:

ln -s /wherever_netbeans_is/bin/javac /usr/bin/javac

Good luck!



All times are GMT -5. The time now is 12:28 AM.