Friday, November 27, 2009

Are J# (.NET) syntax and library references exactly the same as standard Sun JAVA?

I only as because I'm using JSC to compile java files that I've compiled previously with javac, but am getting all sorts of weird error messages about missing ';' and '%26gt;' characters.



%26lt;code%26gt;



C:\%26gt;jsc JSCTest.java



Microsoft (R) JScript Compiler version 8.00.50727



for Microsoft (R) .NET Framework version 2.0.50727



Copyright (C) Microsoft Corporation 1996-2005. All rights reserved.



JSCTest.java(5,35) : error JS1193: Expected ',' or ')'



JSCTest.java(5,40) : error JS1002: Syntax error



%26lt;/code%26gt;



what am I doing wrong?



Are J# (.NET) syntax and library references exactly the same as standard Sun JAVA?windows 95



No, J# is not the same as standard Sun Java; problems compiling conformant Java code under J# are not at all uncommon.



But I don't think that is your problem here. It looks like you are using the JavaScript compiler, not the Java compiler. Java and JavaScript are not the same thing at all!



You should download the latest Java developer's kit from http://java.sun.com and use the "javac" command contained therein to compile your Java code.

No comments:

Post a Comment

 
postage rate