Results 1 to 12 of 12
Thread: How to build jar with JNI
- 07-20-2010, 05:09 PM #1
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
How to build jar with JNI
Greetings,
I now understand how JNI works, but I have a problem building the project.
The project runs on run project using Netbeans 6.8, but as I look into the .jar through WinRar - the dll file isn't found.
Plus, running the jar file won't even display the JFrame.
I have done two ways,
1) Make a folder wherein all the header and source of the dll are found inside the project folder;
2) Copy only the dll and place it into the project folder.
In what way would this be solved?
Thanks,Every project, package, class, method, variable, syntax, algorithm, etc.
are registered in my memory bank. Thanks to this thread.
- 07-20-2010, 05:37 PM #2
Don't know anything about a project folder.
I think that the .dll files have to be outside the jar file as they are probably loaded by the OS vs read from the classpath.
- 07-21-2010, 04:25 PM #3
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
Thanks...
But is there a way to insert the .dll into the .jar file?
I would appreciate it if that would be possible.
Thanks.Every project, package, class, method, variable, syntax, algorithm, etc.
are registered in my memory bank. Thanks to this thread.
- 07-21-2010, 04:35 PM #4
Yes use the jar command with the u option.is there a way to insert the .dll into the .jar file
Why do you want a .dll file in a jar file?
- 07-21-2010, 04:49 PM #5
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
For additional security purposes and more easier deployment.
How would I do that, I am building the project using Netbeans 6.9 (just converted the project from Netbeans 6.8)Every project, package, class, method, variable, syntax, algorithm, etc.
are registered in my memory bank. Thanks to this thread.
- 07-21-2010, 05:00 PM #6
Sorry, I have no idea on how to use your IDE.
What use is the .dll in the jar file? The OS won't look for it there.
Do you plan to copy it out of the jar file so the OS can find it?
- 07-21-2010, 05:13 PM #7
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
The .dll is used for JNI through C in which manipulates the Windows Registry.
I find it somehow wrong if the .dll is displayed within the directory where the .jar is found.Every project, package, class, method, variable, syntax, algorithm, etc.
are registered in my memory bank. Thanks to this thread.
- 07-21-2010, 05:19 PM #8
What does "wrong" mean? There are errors or you don't like it.I find it somehow wrong if the .dll is displayed within the directory where the .jar is found
Have you tried executing the program when the .dll is only inside the jar and not visible to the OS on any of its PATHs? Does it work?
- 07-21-2010, 06:09 PM #9
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
Every project, package, class, method, variable, syntax, algorithm, etc.
are registered in my memory bank. Thanks to this thread.
- 07-21-2010, 06:53 PM #10
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
I expect Netbeans doesn't include it in the jar for the same reason it doesn't include other jars in the jar. It doesn't make sense to.
I expect it sticks it either in the jars in the lib directory of the dist folder, or something along those lines.
- 07-21-2010, 07:13 PM #11
Senior Member
- Join Date
- Mar 2010
- Location
- Manila, Philippines
- Posts
- 257
- Rep Power
- 4
- 07-22-2010, 08:43 AM #12
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Similar Threads
-
ant build
By sardare in forum New To JavaReplies: 4Last Post: 04-02-2009, 10:02 PM -
Unable to build
By jkeller in forum EclipseReplies: 1Last Post: 01-15-2009, 06:56 PM -
various stuffs to build GUI
By Devi in forum AWT / SwingReplies: 1Last Post: 12-01-2008, 07:04 PM -
clean and Build
By bhanu in forum EclipseReplies: 3Last Post: 07-03-2008, 01:13 PM -
To those who want to build a new OS, you may read this for a while...
By sukatoa in forum Forum LobbyReplies: 0Last Post: 06-11-2008, 01:56 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks