Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jun 2000 16:31:12 +0900 (JST)
From:      akr@m17n.org
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/19330: strange behaviour of linux-jdk-1.2.2 (or linux emulation?).
Message-ID:  <20000616073112.0D26227F@flux.m17n.org>

next in thread | raw e-mail | index | archive | help

>Number:         19330
>Category:       ports
>Synopsis:       java interpreter may fail to detect class on current directory.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 16 00:40:04 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Tanaka Akira
>Release:        FreeBSD 4.0-RELEASE i386
>Organization:
m17n
>Environment:

% pkg_info linux-jdk-1.2.2 
Information for linux-jdk-1.2.2:

Comment:
Blackdown Linux Java Developers Kit 1.2.2

Description:
Blackdown Linux Java Developers Kit 1.2.2


% uname -a
FreeBSD flux 4.0-RELEASE FreeBSD 4.0-RELEASE #0: Wed May 24 00:03:30 JST 2000     akr@flux.m17n.org:/usr/src/sys/compile/AKR  i386

>Description:

The interpreter `java' cannot find class file on a current directory after
`mkdir test_directory; rmdir test_directory'.

I think mkdir/rmdir shouldn't affect 

>How-To-Repeat:

The test program is follows.

% cat Test.java             
class Test {
  public static void main(String[] argv) {
    System.out.println("Hello world.");
  }
}

Java compilere and interpreter is follows.

% which javac
/usr/local/linux-jdk1.2.2/bin/javac
% which java             
/usr/local/linux-jdk1.2.2/bin/java

Make sure that CLASSPATH is not set.

% unset CLASSPATH

Compile the test program.

% javac Test.java

Run the test program.  No problem.

% java Test
Hello world.

Create some directory and remove it.
It shouldn't cause any problem.

% mkdir test_directory; rmdir test_directory

Run the test program again.  The interpreter cannot find the class `Test'.

% java Test             
Exception in thread "main" java.lang.NoClassDefFoundError: Test
zsh: exit 1     java Test

Run the test program again with the option -cp.  It works well.

% java -cp `pwd` Test
Hello world.

Run the test program again without the option -cp.  It works well again.

% java Test          
Hello world.

>Fix:

I cannot suppose the reason of this behaviour...


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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