[SOLVED] Directory inside JAR that JIntelliType looks in

Feature Requests, Comments, Bugs, and Suggestions on the JIntellitype Java API.

[SOLVED] Directory inside JAR that JIntelliType looks in

Postby Chicken325 » Mon Mar 12, 2012 4:59 pm

Either I'm stupid (most likely possibility :P) or where JIntellitype looks inside a JAR for JIntellitype.dll isn't very well documented. I can get my application to work with JIntellitype.dll in a folder with/next to the JAR, (which, mind you, works excellently; thank you for this incredibly wonderful tool! :D) but no matter where I seem to put it inside my JAR, it refuses to find it and throws an error every time I try to run it. I've tried the folder the JIntellitype library is in, the root folder, and the folder my main class is in. None of them worked. I'm using JRE 1.6.0_25 64-bit.

Sorry to ask this by the way; looking at the posts, it is my understanding that pretty much all questions are at least answered in part by melloware... :oops:
Chicken325
 
Posts: 5
Joined: Mon Mar 12, 2012 4:46 pm

Re: Directory inside JAR that JIntelliType looks in

Postby Melloware » Mon Mar 12, 2012 6:21 pm

I think that code was submitted by a user if you look in the source.

http://code.google.com/p/jintellitype/s ... itype.java

It looks like it is looking in your JAR for the path...

Code: Select all
com/melloware/jintellitype/JIntellitype.dll
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11062
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Directory inside JAR that JIntelliType looks in

Postby Chicken325 » Mon Mar 12, 2012 7:55 pm

I've tried putting it there before. It still fails... I'm not sure why.

Below are screenshots.

http://snapnhost.com/info/162 <-- renamed to zip so I could see inside
http://snapnhost.com/info/163
Chicken325
 
Posts: 5
Joined: Mon Mar 12, 2012 4:46 pm

Re: Directory inside JAR that JIntelliType looks in

Postby Melloware » Mon Mar 12, 2012 9:26 pm

Hmmm that definitely looks right.

That code was donated by a user on these forums who got it working for himself. I never actually tried it myself. There must be a bug.

Can you pull down the source locally and add System.out.println()'s to find out where it is falling down?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11062
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Directory inside JAR that JIntelliType looks in

Postby Chicken325 » Mon Mar 12, 2012 11:12 pm

Looking at the error and http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/ClassLoader.html#getSystemResourceAsStream(java.lang.String), it appears line 145:
Code: Select all
while ((bytesRead = is.read(buffer)) != -1) {

throws an NullPointerException because the InputStream "is" is null. getSystemResourceAsStream(), the method used to retrieve "is", has in its documentation info that says it returns null when the stream cannot be found, so basically it sounds like getSystemResourceAsStream() can't find an input stream out of the path it was given ("com/melloware/jintellitype/JIntellitype.jar").

I have a crazy French test tomorrow, (oh geez, the time, I mean today xD) so I only had time to look over the code for 10 minutes and give you back what I saw. I might be able to compile a debugger version tomorrow, but I have a project due, and then an even harder test the day after, so I don't know... :(
Chicken325
 
Posts: 5
Joined: Mon Mar 12, 2012 4:46 pm

Re: Directory inside JAR that JIntelliType looks in

Postby Chicken325 » Wed Mar 14, 2012 7:29 pm

I found time to try, but now I don't really know how to make the source into a project. It seem simple enough, but I've never had to do it before. So what I posted above... that's really all the help I can give you at the moment. :(
Chicken325
 
Posts: 5
Joined: Mon Mar 12, 2012 4:46 pm

Re: Directory inside JAR that JIntelliType looks in

Postby Melloware » Wed Mar 14, 2012 9:31 pm

Chicken325 wrote:I found time to try, but now I don't really know how to make the source into a project. It seem simple enough, but I've never had to do it before. So what I posted above... that's really all the help I can give you at the moment. :(


OK I will see if I have time to write a test and try it out...
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11062
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA

Re: Directory inside JAR that JIntelliType looks in

Postby Chicken325 » Sun Mar 25, 2012 8:10 pm

o_O

It works for me now. I did not change anything related to JIntellitype. Weird.
Chicken325
 
Posts: 5
Joined: Mon Mar 12, 2012 4:46 pm

Re: Directory inside JAR that JIntelliType looks in

Postby Melloware » Mon Mar 26, 2012 4:34 am

Chicken325 wrote:o_O

It works for me now. I did not change anything related to JIntellitype. Weird.


very weird! I will mark SOLVED.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Melloware Inc.
http://www.melloware.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
User avatar
Melloware
Site Admin
 
Posts: 11062
Joined: Thu Dec 01, 2005 10:24 pm
Location: Philadelphia, Pennsylvania USA


Return to JIntellitype

Who is online

Users browsing this forum: No registered users and 1 guest

cron