🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18448

Weird Problem

#18448
From: angus m. fraser
Date: Mon, 22 Jun 1998 00:00
31 lines
1116 bytes
Consider this trivial class -

public class test
{
  public static void main(String[] args)
  {
    test t = new test();
    System.out.println("main");
    System.out.println(args.length);
  }
}

The only class in a Jbuilder project and no package. Go to the Project 
Properties and add '1 2 3' as command line parameters and output to the 
Execution log. Run it and you get -

main
3

Now if I switch to a NT4 command prompt and run 'java test 1 2 3' I get -

main
0

Why? 

The only java option I'm using is the -classpath one which points to 
classes.zip. Since it works in the IDE I must be missing something.

Angus Fraser
Technical Details
Message-ID: <memo.19980622222749.90A@amf.btinternet.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,773c5191e9cfd0e1,start
X-Google-Attributes: gidf74b3,public
From: amf@btinternet.com (angus m. fraser)
Subject: Weird Problem
Date: 1998/06/22
Message-ID: <memo.19980622222749.90A@amf.btinternet.com>
X-Deja-AN: 365103749
Organization: afraser@cix
X-URL: http://www.ameol.com
X-News-Software: Ameol2
Reply-To: amf@btinternet.com
Newsgroups: borland.public.jbuilder.java.language