Solved

Win32 programming with Java?

Posted on 2002-03-21
7
478 Views
Last Modified: 2012-05-04
1. Is the above possible? Does Java provide classes to be able write win32 programs?

2. Can I write a Java Service to run on a NT box? If so how?

3. Can I make a set of Java classes into an Win32 executable?

4. With Java how can I retrienve/update NT registry entries. I don't think I can use the Java.lang.System class right? If not, how do I go about this?


sora
0
Comment
Question by:sora
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 4

Expert Comment

by:Oliver_Dornauf
ID: 6887970
1) no. Java classes can only run on a Java Virtual Machine wich runs under WIN32. But you can call WIN32 dlls etc using the java native interface.

2) http://www.eworksmart.com/JNT

3) see java native interface

4) NO. You have to write a win32 dll to retive this values and use the java native interface to call the dll. Because java is plattform independ)

Look at http://www.beq.ca/downloads/jreg aus an example to read registry values and using the java native interface


0
 
LVL 1

Expert Comment

by:mallyh
ID: 6887997
2 and 4 Yes: http://www.jobjects.com/products/jst/

Services, no problem, registry access no problem.

1. The answer is definately no.

3. Only by cheating, Visual Cafe and Supercede and
no doubt a few others provide this functionality, but
it is not an executable which you can distribute without
a whole load of dll's which really just contain the
JVM (OK I am sure they contain something totally different), but thats the effect as they do not run as fast as a
win32 application would).
0
 
LVL 19

Accepted Solution

by:
Jim Cakalic earned 34 total points
ID: 6889219
Hi. To add to the previous comments:

1) These packages are open source
http://staff.develop.com/halloway/code/jawin.html
http://www.rolemaker.dk/JWindows/index.htm

And these are commercial
http://www.excelsior-usa.com/xfunction.html
http://www.nevaobject.com/_docs/_coroutine/coroutine.htm

2) I've had really good success with JavaService.
http://www.alexandriasc.com/software/JavaService/index.html

3) Microsofts Java SDK contains a utility called jexegen. It requires the Microsoft IE JVM on the target.
http://www.alexandriasc.com/software/JavaService/index.html

Executable "wrapper"/launcher technologies?
http://mpowers.net/executor/
http://www.ucware.com/jexec/
http://www.rolemaker.dk/nonRoleMaker/javalauncher/marner_java_launcher.htm

Interesting article on pros/cons of compiling Java to native code
http://www-106.ibm.com/developerworks/java/library/j-native.html

This page lists a number of commercial Java native code compilation technologies for various platforms
http://www.geocities.com/marcoschmidt.geo/jcomp.html

4) Use one of the Win32 API packages. Also had good success with the previously named JST package.
http://www.jobjects.com/products/jst/

Best regards,
Jim Cakalic
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

by:sora
ID: 6890445
Thanks guys for the wonderful answers. I will split the answers among all of you. Exactly in what proportion - I will need some time go through the links you posted to decide.

Thanks again!

sora
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7901090
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
split points between: jim_cakalic, Oliver_Dornauf, mallyh
Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venci75
EE Cleanup Volunteer
0
 
LVL 19

Expert Comment

by:Jim Cakalic
ID: 7903882
OK. Thanks.
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7963118
Per recommendation, force-accepted.

Netminder
EE Admin

Oliver_Dornauf: points for you at http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20516486.html
mallyh: points for you at http://www.experts-exchange.com/Programming/Programming_Languages/Java/Q_20516487.html
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question