image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old January 12th, 2001, 11:56 AM
barryhf's Avatar
Registered User
 
Join Date: Nov 2000
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
barryhf is on a distinguished road

I'm trying to do a very simple thing, compile HelloWorld.java on Mac OS X Public Beta.

java and javac are apparently in the path, the program is in the current directory. java compiles it into a .class file. But when I try to run the app "java HelloWorld.class", I get the ClassNotFound exception at run time.

This is the same HW app that I've compiled under OS9, Linux and NT. I've tried "setenv CLASSPATH = ." I'm running from the directory that the .class file is in.

Clues?

OS X PB out of the box.
I didn't download the dev tools.

Reply With Quote
  #2  
Old January 12th, 2001, 06:20 PM
Tigger's Avatar
Bring mich zum Licht!
 
Join Date: Nov 2000
Location: Germany
Posts: 395
Thanks: 0
Thanked 0 Times in 0 Posts
Tigger is on a distinguished road
Quote:
Originally posted by barryhf
But when I try to run the app "java HelloWorld.class", I get the ClassNotFound exception at run time.
This just a common error.
you have to call "java HelloWorld", without the ending .class.
The call "java HelloWorld.class" would mean you are calling a class named class inside the pachkage HelloWorld.

So always call your classes without the ending.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php won't compile on Panther Gnomo Mac OS X System & Mac Software 0 October 27th, 2003 11:12 AM
how to compile Pine in 10.2 emck Unix & X11 5 November 18th, 2002 12:06 PM
HELP: I have no idea how to compile! Berk Software Programming & Web Scripting 2 October 31st, 2002 12:55 PM
How to compile stuff fintler Unix & X11 1 August 28th, 2002 08:57 AM
tk compile crash buc99 Software Programming & Web Scripting 0 June 6th, 2002 12:38 AM


All times are GMT -5. The time now is 07:20 PM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.