• Post Reply Bookmark Topic Watch Topic
  • New Topic

System applications in Java  RSS feed

 
Ravi Ramnath
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Visual Basic, we can create apps that perform system operations like
CD Tray open/close,system shutdown/restart,registry maipulation,and many more..with use of Windows API.

Is there any provision in Java to create such applications?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To access platform-specific APIs, you can use the Java Native Interface, the standard mechanism for linking Java code with platform-specific non-Java code. See, for example, here.
 
Ravi Ramnath
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Earnest

but one more thing -
Visual basic comes with a file "win32api.txt",which lists all the supported system APIs.
Where I can find such file so that i can easily refer to it and use required API in my java application?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need platform-specific development tools to build a native library -- i.e., you'll need to buy Visual C++ or something like that. You'll then have to use the help files that come with it, along with Microsoft's web site, etc. To work with JNI, you need to know how to write native code on your platform; Sun does not take responsibility for teaching you how.
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ravindra harige:
In Visual Basic, we can create apps that perform system operations like
CD Tray open/close,system shutdown/restart,registry maipulation,and many more..with use of Windows API.

Is there any provision in Java to create such applications?


IMHO, if there is such a great need to use so many features of the Windows API, it is probably best to stay with your current development system. If Visual Basic does everything that you want, and you already know how to develop for it, I say you should stay in that environment.

Henry
 
Ravi Ramnath
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Henry,
I've been doing programming in Java.I know Java provides best support for creating apps on imaging,animation,database,etc.But I've never explored its system application part.As I mostly use Windows platform,was just curious about can such appilications be created in Java?
If Win32APIs can be used (easily) in Java,then I think It would make Java more powerfull.And programmers will've another alternative for VB.

-
Ravi.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16059
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try searching Google for "java win32 api" and you will find some interesting information.

The documentation of the Win32 API is available in Microsoft's MSDN library online: http://msdn2.microsoft.com/en-us/library/default.aspx
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!