[arch-general] Java Problem
Hunter Jozwiak
hunter.t.joz at gmail.com
Mon Dec 8 01:56:32 UTC 2014
On 12/7/14, Ondřej Kučera <ondrej.kucera at centrum.cz> wrote:
> Hi,
>
> On 8.12.2014 01:59, Hunter Jozwiak wrote:
>> Hello:
>> I have come accross an interesting issue with Java. Let's say I
>> fashion a simple Hello World app, and entitle it hello.java The code
>> would be:
>> class hello
>> {
>> public void main(String[] args)
>> {
>> System.out.println("Hello World!");
>> }
>> }
>> Then, I compile the code as a regular user, with javac hello.java
>> Here's the odd part: I type java hello, and I get unable to find main
>> class hello
>> But, if I run sudo java bhello, it works fine. What is the solution to
>> not having to run Java software as sudo?
>
> Does
> java -cp . hello
> work? If so, what is the output of
> echo $CLASSPATH
> ?
>
> Ondra
>
>
> --
> Cheers,
> Ondřej Kučera
The CLASSPATH variable, after java -cp test, says:
/home/hjozwiak/GNUstep/libraries/Library/Libraries/Java:/usr/lib/GNUstep/Library/Java
>
More information about the arch-general
mailing list