Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Win32 programming with Java?

Posted on 2002-03-21
7
Medium Priority
?
508 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
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 136 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

972 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