• 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: Using NSClassFromString with a Custom Class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using NSClassFromString with a Custom Class


  • Subject: Re: Using NSClassFromString with a Custom Class
  • From: Andreas Monitzer <email@hidden>
  • Date: Mon, 12 Jun 2006 14:36:39 +0200

On Jun 12, 2006, at 14:29, Steve Anderson wrote:

RE the Cocoa Dev Central link, I have defined the Classpath using the values from the example I was following:

	...
   <key>NSJavaNeeded</key>
	<string>YES</string>
	<key>NSJavaRoot</key>
	<string>Contents/Resources</string>
	<key>NSJavaPath</key>
	<array>
		<string>JavaCompile.jar</string>
	</array>
	...

And as the Cocoa Dev Central link stated adding the JavaVM framework, import statement and loading the VM explicitly is not required in Cocoa apps, evident from the fact that my code using java.lang.String works.

Well, that was correct in 10.1, I don't know if it is still the case.

I guess I need to write something like:

Class javaClass = NSClassFromString (@"something.something.HelloWorldJava");

That's only required when there's a package-declaration in the Java file.


andy

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Using NSClassFromString with a Custom Class (From: Steve Anderson <email@hidden>)
 >Re: Using NSClassFromString with a Custom Class (From: Andreas Monitzer <email@hidden>)
 >Re: Using NSClassFromString with a Custom Class (From: Steve Anderson <email@hidden>)

  • Prev by Date: Re: Using NSClassFromString with a Custom Class
  • Next by Date: Re: If Functions
  • Previous by thread: Re: Using NSClassFromString with a Custom Class
  • Next by thread: Re: Using NSClassFromString with a Custom Class
  • Index(es):
    • Date
    • Thread