please use mpijavac instead of javac
this will automagically set the classpath with the ompi java libraries.

if there is no javac, it is likely you did not configure ompi with
--enable-mpi-java

On Monday, September 14, 2015, Ibrahim Ikhlawi <ibrahim_...@hotmail.com>
wrote:

>
> Hi,
>
> I am beginner in OpenMPI. I want to run some examples from the extracted
> openmpi-1.10.0/example,
> <http://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.0.tar.gz>
> namely Hello.java and Ring.java.
> But when I compile Hello.java with:
> javac Hello.java
>
> I get this error:
>
> Hello.java:25: error: package mpi does not existimport mpi.*;^Hello.java:28: 
> error: cannot find symbol
>     static public void main(String[] args) throws MPIException {
>                                                   ^
>   symbol:   class MPIException
>   location: class HelloHello.java:31: error: cannot find symbol
>     MPI.Init(args);
>     ^
>   symbol:   variable MPI
>   location: class HelloHello.java:33: error: package MPI does not exist
>     int myrank = MPI.COMM_WORLD.getRank();
>                     ^Hello.java:34: error: package MPI does not exist
>     int size = MPI.COMM_WORLD.getSize() ;
>                   ^Hello.java:37: error: cannot find symbol
>     MPI.Finalize();
>     ^
>   symbol:   variable MPI
>   location: class Hello6 errors
>
>
> How can I resolve this problem or where can I find the mpi.jar?
>
> Best regards,
> Ibrahim
>
> PS: I cannot find mpi.jar in /lib directory.
>
>
>
>
>

Reply via email to