delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/08/28/10:22:54

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 28 Aug 2001 16:21:13 +0200
From: Daniel Steinmann <daniel DOT steinmann AT insonic DOT com>
To: "Tait, Allen" <atait AT IDEXX DOT com>
Cc: "'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
Subject: Re: Java NoClassDefFoundError
Message-ID: <20010828162113.A1484@stonie.insonic.com>
Mail-Followup-To: "Tait, Allen" <atait AT IDEXX DOT com>,
"'cygwin AT cygwin DOT com'" <cygwin AT cygwin DOT com>
References: <AD3AFCD57EBBD411B23D0008C791789C4A3086 AT elmer DOT westbrook DOT idexx DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <AD3AFCD57EBBD411B23D0008C791789C4A3086@elmer.westbrook.idexx.com>; from atait@IDEXX.com on Tue, Aug 28, 2001 at 10:08:38AM -0400

Tait, Allen wrote:
> Having a problem executing a java program in a .sh file when running the .sh
> in Cygwin.  The following code snip is part of a larger .sh file that was
> written for the Solaris env.  I am trying to get it functioning on Windows
> NT.  Before calling "java", the script cd's to the directory where the java
> program is.  However, the call throws a "NoClassDefFoundError" exception.
> It can not find the class being called, (.org.jboss.Main).  I can execute
> this call on the command line and it works fine.  When the code is called
> inside of the .sh, it does not.  I have tried specifying the paths in
> -classpath as both full and relative paths.  Still no luck.  Has anyone else
> encountered a similar problem?

You have to invoke java with windows style path:

  CLASSPATH=.:run.jar:../lib/xerces.jar:../lib/crimson.jar

  # Convert path in case of cygwin
  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`

  java -classpath "$CLASSPATH" org.jboss.Main tomcat

HTH,
Daniel.

-- 
Daniel Steinmann, Insonic AG, Zuerich, Switzerland
daniel DOT steinmann AT insonic DOT com, +41 1 317 88 99, fax: +41 1 317 88 90

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019