Skip to main content
gamedev.net
🔒 Locked

[java] Java and Windows

Started by mc3712 Jan 7, 2002 at 3:30 PM 9 replies 600+ views
Original Post
mc3712
mc3712
I have two (quick) questions: 1) I''m certain that there are ways to adjust Windows sound volume, does anyone know how? 2) Is it possible to create "system tray programs" with Java? btw. Don''t tell me to write this kind of programs with C++ or Visual Basic. I can''t code in C++ (almost at all) and I don''t want to study basics anymore.
Jim_Ross
Jim_Ross
1) you need msvc++

2) you need msvc++


Edited by - Jim_Ross on January 7, 2002 5:32:23 PM
Null and Void
Null and Void
quote:
Original post by Jim_Ross
1) you need msvc++
2) you need msvc++

1) MSVC is simply an implementation of C++. If you''re implying that he must use C++, then it isn''t true that he must use MSVC.
2) He said he didn''t know C++, and he wants to do it in Java.
3) I don''t know much Java, but I''m pretty sure that''s possible (I''ve seen Java programs do it before, but I can''t remember what they were).

[Resist Windows XP''s Invasive Production Activation Technology!]
Kaijin
Kaijin
I''m pretty sure you can''t do that in Java without the use of JNI (and then you ould have to program the native part in C/C++).

There might be a Windows Java library out there that already allows you to do this so have a look. I know JWindows is a MFC to Java binding but I don''t know if it can do what you ask.

- Kaijin
Jim_Ross
Jim_Ross
quote:
Original post by Null and Void

3) I don''t know much Java, but I''m pretty sure that''s possible (I''ve seen Java programs do it before, but I can''t remember what they were).




Wow, i really wish the name of the forum were larger. Then we wouldn''t get people who know nothing of java give people misinformation as much.
Null and Void
Null and Void
quote:
Original post by Jim_Ross
Wow, i really wish the name of the forum were larger. Then we wouldn''t get people who know nothing of java give people misinformation as much.

Firstly, I said "not much Java," not "no Java." I say that because I technically know Java, but I know it from its earliest days so not much of it applies anymore.

Secondly, I''ve seen Java programs do that. No, not applets, real Java client side programs. I find it somewhat annoying that you say it''s impossible (and throw in an insult for good measure) when I''ve seen it done.

[Resist Windows XP''s Invasive Production Activation Technology!]
GKW
GKW
I don''t think Ross said you couldn''t get a java app to have a icon in the system tray, he is just saying you can''t do it without JNI. I think most of the regulars in the forum are a little tired of C/C++ people posting here without realizing this is a java forum. No offense to you but it has just happened a lot lately.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato
"... we should have such an empire for liberty as she has never surveyed since the creation ..."Thomas Jefferson
Strauss X
Strauss X
Maybe it was done using some of Microsoft extensions that come with VJ++, one of this extensions encapsulates the WIN32 api. Keep in mind that rhis extensions makes the program non portable. And I think Microsoft don''t support it anymore.
bslayerw
bslayerw
Please keep in mind that Java is cross platform and you are wanting to do something very Windows specific. There is probably some solution out there like install shield or something that can create and executable that can launch the Java app and add an icon to your tray or something.
Graylien
Graylien
quote:
Original post by mc3712
2) Is it possible to create "system tray programs" with Java?



There''s an article at the following URL which you might find interesting:

http://www.javaworld.com/javaworld/jw-10-1999/jw-10-jni.html

Here''s the abstract (emphasis mine):

quote:

In this article, Tal Liron presents JNI-based design and implementation techniques that can help make your application competitive on all platforms without compromising cross-platform deployment. He provides a full step-by-step tutorial for adding a Windows-specific desktop indicator feature. The tutorial contains an example of attaching native threads to a Java Virtual Machine, plus many generic JNI tips and tricks that even non-Windows programmers may find useful. Likewise, Tal covers design considerations, not just implementation issues, so you don''t have to be a master programmer to appreciate the lessons learned. (4,000 words)

------When thirsty for life, drink whisky. When thirsty for water, add ice.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.