Failing to push standalone java app


Rahul Gupta
 

Hi,

I am trying to push a standalone Java app that has a 'public static void main(..)' and uses other dependencies. I tried setting the classpath in the jar's MANIFEST.MF, created a new jar that also contains dependent jars in its root and did a cf push but that didn't help either - the 'cf push -p xxxxxxx.jar' fails while resolving runtime dependencies

e.g. ERR Exception in thread "main" java.lang.NoClassDefFoundError: com/XXX/client/AbcXyz


Here is the content of manifest.mf:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Built-By: smokingfly
Class-Path: XXX-123.jar AAA.789.jar
Created-By: Apache Maven 3.2.3
Build-Jdk: 1.8.0_40
Main-Class: com.cf.samples.TestClient

TestClient is the class with main method.

I could not find any documentation that could help me with this. Could someone please help?

Many thanks.

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.