You are not logged in.

abcuser

Unregistered

1

Monday, January 12th 2009, 7:36pm

How to pass parameters to Console Application from command shell?

Hi,
I would like to write application in Console Application that gets parameters from command shell and use that parameters in application.

For example, very simple sample would be:
1. start application with 1 parameter (something like java -jar "myjar myparameter")
2. print myparameter value to screen
Regards

Jubaca

Beginner

Posts: 6

Date of registration: Dec 6th 2008

  • Send private message

2

Monday, January 12th 2009, 9:57pm

Hi,

Jabaco Source

1
2
3
4
5
6
7
8
9
Public Sub main(ByJava args() As String) 
   Dim myArgs() As String 
   myArgs = args 
 
   For i = 0 To UBound(myArgs) 
  	out.println myArgs(i) 
   Next 
	
End Sub


maybe try to execute java -jar myjar myparameter without "

Rate this thread
WoltLab Burning Board