• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Difficulty with Java application: cannot find main class at run time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Difficulty with Java application: cannot find main class at run time


  • Subject: Re: Difficulty with Java application: cannot find main class at run time
  • From: David Ewing <email@hidden>
  • Date: Tue, 25 Jan 2005 09:52:26 -0700

The main class name is normally set up on the command line of the current Executable. Choose "Project->Edit Active Executable" to change the settings. I hope that helps.

Dave

On Jan 20, 2005, at 5:44 PM, Christopher Henrich wrote:



I am trying to compile and run a Java application, built with example code for Daniel Selman's book _Java_ _3D_ _Programming_.
I am able to build the application, but at run time it fails with these messages:


[LaunchRunner Error] The main class "AppearanceTest" could not be found.
[JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
Exception in thread "main" java.lang.NullPointerException
at apple.launcher.LaunchRunner.run(LaunchRunner.java:85)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:50)
at apple.launcher.JavaApplicationLauncher.launch (JavaApplicationLauncher.java:52)


Executable “AppearanceTest” has exited with status 0.

Simpler applications, such as the "Hello World!" app that you get when you initialize an XCode project, run.

In Selman's code, the main class is deeply nested in a package. This is the only relevant difference that I can think of.

How do I tell XCode to arrange for the run time support to kmow how to find the main class?

some details:
Hardware: dual 867 MHz PowerPC G4
OS: Mac OS X Version 10.3.7
Xcode version: 1.5
Java 1.4.2 installed.
Java3D downloaded from Apple - I think it is a port of Sun's Java 3D 1.3.1.


TIA for any help.

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Difficulty with Java application: cannot find main class at run time (From: Christopher Henrich <email@hidden>)

  • Prev by Date: Re: Distributed build overhead and Mac Mini vs XServe pricing
  • Next by Date: Re: Distributed build overhead and Mac Mini vs XServe pricing
  • Previous by thread: Difficulty with Java application: cannot find main class at run time
  • Next by thread: Xcode Help and Doxygen
  • Index(es):
    • Date
    • Thread