image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
LinkBack Thread Tools
  #1  
Old January 17th, 2002, 04:22 PM
Registered User
 
Join Date: Jan 2002
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Erredon is on a distinguished road
Unhappy Shell changing . (periods) to / (slashes)

I am using the terminal to execute java code. Here is something similar to what I would type.

java -jar mycode.jar http://mysite.com/1.1.1/myothercode.jar

The stuff after mycode.jar is an argument that is sent into the main() function of my code. This is standard java practice.

My problem is that Java on OSX or OSX itself is changing the .'s to /'s so that I get this..

java -jar mycode.jar http://mysite.com/1/1/1/myothercode/jar

It may also be apache running on my osx box doing it. Anyone have any ideas?? This line works just fine on a redhat linux box btw.

Thanks for any help.
Reply With Quote
  #2  
Old January 17th, 2002, 04:35 PM
blb blb is offline
`'
 
Join Date: Apr 2001
Location: CO, USA
Posts: 651
Thanks: 0
Thanked 0 Times in 0 Posts
blb is on a distinguished road
There must be more going on against the args given to main; the following

Code:
public class jtest
{
   public static void main( String args[] )
   {
      System.out.println( "args[ 0 ] is " + args[ 0 ] );

      System.exit(0);
   }
}
when run

Code:
$ java jtest http://mysite.com/1.1.1/myothercode.jar
prints what is expected

Code:
args[ 0 ] is http://mysite.com/1.1.1/myothercode.jar
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[FAQ] - Setting the UNIX shell prompt michaelsanford HOWTO & FAQs 4 March 27th, 2003 02:25 PM
[HOWTO] - Use niutil gatorparrots HOWTO & FAQs 6 December 10th, 2002 04:24 PM
changing shell resulting in ftp problem? i_m_nuts Mac OS X System & Mac Software 4 April 17th, 2002 08:16 PM
Poll: What UNIX shell do you use? vikingshelmut Mac OS X System & Mac Software 17 December 21st, 2001 11:37 AM


All times are GMT -5. The time now is 05:38 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC1
Copyright 2000-2010 DigitalCrowd, Inc.