Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 16:30:17 +0300
From:      Michael Zhilin <mizhka@gmail.com>
To:        mexas@bris.ac.uk
Cc:        freebsd-java@freebsd.org
Subject:   Re: pkg: /usr/local/bin/java was not found in the database
Message-ID:  <CAF19XBK58VL1vu4k5z5hf3vwj_LqLzcf1VwWE563Y2MPtrDVHQ@mail.gmail.com>
In-Reply-To: <201605161242.u4GCgmgh019035@mech-as222.men.bris.ac.uk>
References:  <201605161242.u4GCgmgh019035@mech-as222.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

Try it:
$ java HelloWorld

Thanks!

On Mon, May 16, 2016 at 3:42 PM, Anton Shterenlikht <mexas@bris.ac.uk>
wrote:

> I'm trying to resolve some java/OpenGL errors.
> I know nothing about java and next to nothing
> about OpenGL. I just want to run a particular application.
>
> Anyway, in an attempt to get to the bottom of my
> errors [1], I'm trying to run any java/OpenGL
> locally on my 11-current laptop. I'm starting
> with java, something very simple, e.g.:
>  http://www.skylit.com/javamethods/faqs/javaindos.html
>
> $ cat HelloWorld.java
> public class HelloWorld
> {
>   public static void main(String[] args)
>   {
>     System.out.println("Hello, World!");
>   }
> }
>
> I get:
>
> $ javac HelloWorld.java
> $ java HelloWorld.class
> Error: Could not find or load main class HelloWorld.class
>
> This should've worked.
> So I wanted to check which java and javac I'm using:
>
> $ pkg which /usr/local/bin/java
> /usr/local/bin/java was not found in the database
> $ pkg which /usr/local/bin/javac
> /usr/local/bin/javac was not found in the database
> $
>
> Is there something wrong with my java packages?
> I've
>  openjdk8-8.77.3                java/openjdk8
>
> but that seems to store binaries in different folder:
>
> $ pkg info -xl openjd | grep java |grep bin
>         /usr/local/openjdk8/bin/java
>         /usr/local/openjdk8/bin/java-rmi.cgi
>         /usr/local/openjdk8/bin/javac
>         /usr/local/openjdk8/bin/javadoc
>         /usr/local/openjdk8/bin/javah
>         /usr/local/openjdk8/bin/javap
>         /usr/local/openjdk8/jre/bin/java
>
> So I'm not sure what's going on.
>
> Please advise how to test a working java environment.
>
> Thanks
>
> Anton
>
> [1] http://lists.freebsd.org/pipermail/freebsd-java/2016-May/011537.html
> _______________________________________________
> freebsd-java@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-java
> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF19XBK58VL1vu4k5z5hf3vwj_LqLzcf1VwWE563Y2MPtrDVHQ>