Solved

Win32 programming with Java?

Posted on 2002-03-21
7
425 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 5

Author Comment

by:sora
Comment Utility
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
Comment Utility
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
Comment Utility
OK. Thanks.
0
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
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 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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now