[ nice-Bugs-1037192 ] StringIndexOutOfBoundsException running nicec
"SourceForge.net" <[email protected]> Wed, 06 Oct 2004 02:38:25 -0700
| Newsgroups | gmane.comp.lang.nice.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1037192, was opened at 2004-09-29 20:26
Message generated for change (Comment added) made by bonniot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1037192&group_id=12788
Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Daniel Serodio (dserodio)
>Assigned to: Daniel Bonniot (bonniot)
Summary: StringIndexOutOfBoundsException running nicec
Initial Comment:
I just read the Nice user's manual, and tried to
compile the "Coin" enumeration example.
Nice compiler version 0.9.9 (build 2004.09.22, 00:40:25
UTC)
Compiled using JDK 1.4.2_04
I created an empty directory, and created Coin.nice
(attached).
Then I ran cd'ed into this directory and ran "nicec ."
The OS is Windows XP Home SP1, and I tried two versions
of the JDK:
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2_05-b04)
Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0-rc-b63)
Exception in thread "main"
java.lang.StringIndexOutOfBoundsException: String index
out of range: -1
at java.lang.String.substring(String.java:1444)
at
nice.tools.repository.fun.parseRepoURL(main.nice:95)
at
nice.tools.repository.dispatch.parseRepoURL(dispatch.nice)
at
nice.tools.repository.fun.openConnection(main.nice:69)
at
nice.tools.repository.VersionTracker.openConnection(main.nice)
at java.net.URL.openConnection(URL.java:896)
at nice.tools.locator.fun.get(locator.nice:26)
at nice.tools.locator.Locator.get(main.nice)
at bossa.modules.Locator.find(Locator.java:64)
at bossa.modules.Package.<init>(Package.java:75)
at bossa.modules.Package.make(Package.java:58)
at
bossa.modules.fun.setMainPackage(Compilation.nice:89)
at
bossa.modules.Compilation.setMainPackage(Compilation.nice)
at
nice.tools.compiler.fun.compile(interface.nice:38)
at
bossa.modules.Compilation.compile(Compilation.nice)
at
nice.tools.compiler.console.fun.compile(main.nice:165)
at
nice.tools.compiler.console.dispatch.compile(dispatch.nice)
at
nice.tools.compiler.console.fun.main(main.nice:181)
at
nice.tools.compiler.console.dispatch.main(dispatch.nice)
----------------------------------------------------------------------
>Comment By: Daniel Bonniot (bonniot)
Date: 2004-10-06 11:38
Message:
Logged In: YES
user_id=88952
Hi Daniel!
Thanks for your offer to help. This was a quick fix, so I
did it myself, but we'll be glad if you can help out in the
future. You can look at
http://nice.sourceforge.net/cgi-bin/twiki/view/Doc/GetInvolved
for ideas. Also, don't hesitate to use nice-info, meet us on
the IRC channel, ...
Daniel
----------------------------------------------------------------------
Comment By: Daniel Serodio (dserodio)
Date: 2004-09-30 22:52
Message:
Logged In: YES
user_id=58637
Ok, running nicec on the parent directory works ok. I had
read compilation.html, but I assumed that (package ==
directory) so "." (this directory) meant "this package".
Do you need help fixing this bug? Nice seems like a great
language, I'd be glad to help where I can!
----------------------------------------------------------------------
Comment By: Arjan Boeijink (arjanb)
Date: 2004-09-30 20:37
Message:
Logged In: YES
user_id=688815
Nicec shouldn't crash on this but give an error message
instead.
Nice doesn't work on individual source files but on packages.
So when you have created a directory with the sourcefiles
don't cd into it. Run nicec as "nicec packagename" where the
packagename must the same as the directory.
See also: http://nice.sourceforge.net/compilation.html
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=1037192&group_id=12788
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl