PlaneShift
Fan Area => The Hydlaa Plaza => Topic started by: zifter on January 19, 2009, 03:53:25 pm
-
Hi guys,
I'm *attempting* to teach myself java...
I'm running on a Mac Leopard 10.5.6...
As I couldn't find any JSKs for Mac, I came across Soylatte which i've downloaded to
Users/Admin/Applications/Soylatte
I opened terminal.app and typed in the line:
edit autoexec.bat
It opened a TextWrangler file, and in it, i typed:
set path=%path%;applications\soylatte\bin
set classpath=%classpath%;.;
Then rebooted
After that, I opened another TextWrangler file and typed up the tutorial code:
class myfirstjavaprog
{
public static void main(String args[])
{
System.out.println("Hello World");
}
}
And saved it as myfirstjavaprog.java in Users/Admin/Documents/Java
next, i opened terminal.app and typed:
Admins-MacBook:~ Admin$ java myfirstjavaprog
Exception in thread "main" java.lang.NoClassDefFoundError: myfirstjavaprog
[note: the 'Admins-MacBook:~ Admin$' bit is there automatically]
Is there anyone that might be able to point out where I am going wrong? Thanks! :)
-
i dont anything about java but have you looked at http://www.apple.com/downloads/macosx/development_tools/javaee5sdk.html ?
-
COMPILE!!!!!!!!!!!!!
Edit: I dunno about mac OS, but in windows cmd it's like instead of java blablabla.java (which is bad)
you do javac blablabla.java <-- compiles
then java blablabla (without the .java) :flowers: :lol:
-
Didn't mac have its own java implementation with some other coffee themed name? I can't think what it was right now but maybe it was for older architectures, Motorola or whatnot.
-
Cocoa, plox.
-
wel you need to compile the java first using the javac command.