CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Guest

    [VJ++ 1.1] Hello world program

    Hi,

    I'm completely new to J++ and I'm having the following little problem:

    I created a new "Java project" and added a java source code file. Within
    this file, I typed the following code:

    class HelloWorld
    {
    public static void main (String[] Args)
    {
    System.out.println("Hello World!");
    }
    }

    The project and the workspace are called HelloWorld also. As soon as I'm
    trying to compile my project, I get an error message saying that the package
    "lang" can't be found. If I import it using

    import java.lang.*;

    the error message says that it is already imported implicit. But it can't
    find the package lang. Using Sun's JDK 1.1.8 the program works quite
    perfectly.

    Why?

    Thanks,


    Jessica






  2. #2
    Join Date
    Oct 2001
    Location
    Or, US
    Posts
    3

    Re: [VJ++ 1.1] Hello world program

    I may be wrony since I only know J and not J++ but I dont recall it being required to put a ; after the import java.lang.* Then again I am a C++ programmer and Javascript and I dont have time to get very fluent in Java.. I only know a little.

    TParis

    "To Boldly Go...."

  3. #3
    Join Date
    Jan 2001
    Posts
    24

    Re: [VJ++ 1.1] Hello world program

    Try change Arg to arg
    I think it's the problem. Java is key sensetive so you can't just play with the letters like in other languages.
    Does it helped???


  4. #4
    Join Date
    Jan 2001
    Posts
    24

    Re: [VJ++ 1.1] Hello world program

    Try change Args to args
    I think it's the problem. Java is key sensetive so you can't just play with the letters like in other languages.
    Does it helped???


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured