RUNNING JAVA(JIKES)

Asked by chintalvaady

Hello friends...I h`v installed a compiler called Jikes(Using update manager)...Since i WAS a windows user...i dont how to set various paths(set path,etc...)...so that i`m not able to run java programs in ubuntu ...when tried to run it ...i got the following error msg....

ranga@ranga-desktop:~$ jikes ranga.java

Found 2 system errors:

*** Semantic Error: You need to modify your classpath, sourcepath, bootclasspath, and/or extdirs setup. Jikes could not find package "java.lang" in:
                .

*** Semantic Error: The input file "ranga.java" was not found.
ranga@ranga-desktop:~$

so Friends...pls help me to solve this problem ...as quickly as possible...

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Deepak Mishra
Solved:
Last query:
Last reply:
Revision history for this message
Best Deepak Mishra (dpux) said :
#1

i am not familiar with jikes, but this is what you do with java:
go to a terminal :
cd ~
gedit .bashrc

this opens a text editor, you have to add lines like this :
export CLASSPATH=/path/to/the/jar/
export JAVA_HOME=/path/to/jvm

similarly add as many variables ans corresponding values.
this error "Jikes could not find package "java.lang"" makes me think jikes depends on java....so have you installed java on your system ??

Revision history for this message
Deepak Mishra (dpux) said :
#2

your second error :
 The input file "ranga.java" was not found

implies that you havent reached the appropriate location of your file.
so first move to the exact location , like if your program, prg.java is in /home/XXX/java
then ,
cd /home/XXX/java
jikes prg.java

Revision history for this message
chintalvaady (cmraghavendran) said :
#3

yes i hv installed java in my comp...jikes is a java compiler similar to javac..(provided by open source commu)...

Revision history for this message
Deepak Mishra (dpux) said :
#4

then i dont think, it should itself depend on javac/sun-java
you have to just edit the ~/.bashrc now.

Revision history for this message
chintalvaady (cmraghavendran) said :
#5

Thanks Deepak Mishra, that solved my question.