Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2016 13:42:48 +0100 (BST)
From:      Anton Shterenlikht <mexas@bris.ac.uk>
To:        freebsd-java@freebsd.org
Subject:   pkg: /usr/local/bin/java was not found in the database
Message-ID:  <201605161242.u4GCgmgh019035@mech-as222.men.bris.ac.uk>

next in thread | raw e-mail | index | archive | help
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



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