This Question is Possibly Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
6 Replies Last post: Mar 12, 2008 7:35 PM by Serge Piletsky  
  14 posts since
Nov 17, 2007
Currently Being Moderated

Mar 3, 2008 2:09 PM

file system info

Is it possible that using JNIWrapper Api i can get the file system info, like how many partitions are present and also what type are of they , just like in the demo of jniwrapper for windows and that too being platform independent when i m using jniwrapper crossplatform libraries.

Serge Piletsky TeamDev Ltd. 1,066 posts since
Apr 24, 2006
Currently Being Moderated
1. Mar 4, 2008 4:57 PM in response to: paranoid1288
Re: file system info

Of course that is possible on any platform that JNIWrapper supports. That WinPack demo that you have mentioned just demonstrate how to do that on Windows platform using  the corresponding API. And such or similar API exists on another platforms as well. So all you need is to find the required functionality for all that platforms and integrate with it using JNIWrapper. For example, on Mac OS X platform you can use our MacPack library which provides convenient integration with Cocoa API.

 

-Serge

Serge Piletsky TeamDev Ltd. 1,066 posts since
Apr 24, 2006
Currently Being Moderated
4. Mar 12, 2008 5:46 PM in response to: paranoid1288
Re: file system info

I thought it was clear from from my previous reply: WinPack for Windows platforms, MacPack for Mac OS X. And naturally to expect that these libraries will not work on another platforms. Therefore yes, you will need to make separate classes for another platforms. And in these classes you will probably need to call system API functions directly using JNIWrapper for example.

 

-Serge

Serge Piletsky TeamDev Ltd. 1,066 posts since
Apr 24, 2006
Currently Being Moderated
6. Mar 12, 2008 7:35 PM in response to: paranoid1288
Re: file system info

If you want to achieve a "pure" platform independency then you need to use Java only. But as soon as you try to get some platform-specific functionality in your Java application then you need to use either JNI or JNIWrapper which greatly simplifies that.

 

Of course JNIWrapper itself is not an "expert" or "master" of system api of all the OS'es either. JNIWrapper is designed for invocation of native functions directly in Java applications without writing any additional native code: http://www.teamdev.com/jniwrapper/index.jsf

 

-Serge

More Like This

  • Retrieving data ...