Bug#389887: libgetopt-java: Class loading problem

Alfredo Pironti alfredio at users.sourceforge.net
Thu Sep 28 09:19:38 UTC 2006

Package: libgetopt-java
Version: 1.0.11-2
Severity: important

I cannot get the Getopt class loaded if I execute a Java program which
is inside a .jar file.

I suppose this problem is related with upstream code, and not with
debian packaging. However I already asked the upstream author to found
out more on this bug, or at least to tell me where I am wrong, and I got
no answer. So I am reporting this bug to the Debian BTS, hoping you can
help me (and other people having the same issue) to solve this problem.

Problem description follows:

The getopt library itself is working very well, but I have problems
loading it when I launch my program with the java executable from the
command line.

If I launch the .class file of my program, I have to explicitly
specify your .jar file in the classpath, or the gnu.getopt.Getopt
class won't be loaded. Usually it is enough to specify only the
directory containing the jars files, but not with getopt: this makes
me suspicious about how getopt is packaged.

The previous is only a minor issue. In fact if I launch the .jar
version of my program, there's no way to get gnu.getopt.Getopt loaded,
so my program actually can't start.

Googling around I found only another one developer with my problem,
you can take a look at

I'm using debian, sun-java 1.5; deploying the jar file with eclipse
(so I suppose the autogenerated MANIFEST file for my program is

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-k7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages libgetopt-java depends on:
ii  sun-java5-jre [java2-runtime] 1.5.0-08-1 Sun Java(TM) Runtime Environment (

libgetopt-java recommends no packages.

-- no debconf information

More information about the pkg-java-maintainers mailing list