• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

System applications in Java

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
If I'd had more time, I would have written a shorter letter. -T.S. Eliot such a short, tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic