![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
|
C++ program that checks if....
Hello.
I use Linux, and I have no experience in windows. I have to write a C++ program that checks if Java is installed. I have no idea how to check that (there is no directory such /usr/bin ). I need this for my Java app and I want check utility. Can you give me a example how to check if something is installed in windows. Thanks in advance, Jan Birsa
__________________
Linux user jan@fedoraproject.org http://fedoraproject.org/wiki/Market..._composite.gif |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
You'll just have to check for the appropriate file or files in the appropriate directory(s). Just accomodate the fact that they have different names. You'll have to know, of course, where the Java might be installed, or search in several likely places. Refer to your documentation for the various file utility functions.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Programmer
|
Any easyer way?
Is there any file which contains list of programs?
__________________
Linux user jan@fedoraproject.org http://fedoraproject.org/wiki/Market..._composite.gif |
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Many programs are installed into the Program Files directory, though it isn't a requirement. DLLs may or may not be put elsewhere. Entries may or may not be made in the registry. I would suggest that if you are going to program for Windows, you learn how to work with Windows. Just a silly thought.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 | |
|
Programmer
|
Quote:
__________________
Linux user jan@fedoraproject.org http://fedoraproject.org/wiki/Market..._composite.gif |
|
|
|
|
|
|
#6 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Jan: you told us you wanted to use Windows...
|
|
|
|
|
|
#7 | ||
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Quote:
Quote:
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
||
|
|
|
|
|
#8 |
|
Hobbyist Programmer
Join Date: Jun 2005
Location: Helltown
Posts: 162
Rep Power: 4
![]() |
I think what he meant was...get yourself used to windows and its thingimizgys. It might help you when you program for it. For example...if you know common sense windows stuff like...the registry and what its used for in windows...you would not have had to make this thread.
And well, if you are gona check if java works or not, why not simply if you can run a java program =) Like dawei said, it may or many not be in the registry. But if its to be used, its gota be in $PATH right? Unless its somewhere hidden...in which case you'd have to ask the user anyway.
__________________
Spread your wings and fly! Chicken! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Language display in program | Prm753 | C++ | 3 | May 30th, 2006 5:45 PM |
| Help me make a program. read ---> | DBZ | Visual Basic | 8 | Mar 10th, 2006 8:53 AM |
| Creating a program to test a program | sixstringartist | C | 8 | Jan 21st, 2006 1:15 PM |
| auto run hidden program. | kuroko | C++ | 9 | Aug 6th, 2005 10:05 AM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |