Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > How to get a Java program to run in Windows 2000

How to get a Java program to run in Windows 2000
Thread Tools
Junior Member
Join Date: Dec 2003
Location: New Jersey
Status: Offline
Reply With Quote
Jun 20, 2005, 09:27 PM
 
A few weeks ago I wrote a SQL beautifier in Java. I want to use it at work, where we frequently are our looking at SQL statements. My PC at work doesn't have the Java developer Kit that is installed on my iMac at home, so I'm wondering if I can convert my program into an executable that can be run in Windows 2000.
MacBook 2.4 GHz
Mac OS X 10.5.8
     
Mac Elite
Join Date: Oct 2004
Location: Downtown Austin, TX
Status: Offline
Reply With Quote
Jun 21, 2005, 09:19 AM
 
You could get an exe packager for your main class/jar file, or you could bundle it into an executable jar. Or you could write a simple batch script to execute your main class file, something like

'Cj2sdk\jre\bin\java.exe Cprograms\sqlbeautifier\Main'

assuming you have java.exe installed in the above location and also your classes in the above location.

Woowhahs.
     
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Jun 21, 2005, 10:11 AM
 


The problem is there is no JDK on Windows 2000. You have to download it from Sun and install it on the Windblows box.
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
Junior Member
Join Date: Dec 2003
Location: New Jersey
Status: Offline
Reply With Quote
Jun 21, 2005, 10:57 AM
 
Originally Posted by jamil5454
You could get an exe packager for your main class/jar file, or you could bundle it into an executable jar. Or you could write a simple batch script to execute your main class file, something like

'C:\j2sdk\jre\bin\java.exe C:\programs\sqlbeautifier\Main'

assuming you have java.exe installed in the above location and also your classes in the above location.

Woowhahs.

Could either of the above options be done without installing the JDK?
MacBook 2.4 GHz
Mac OS X 10.5.8
     
Junior Member
Join Date: Nov 2004
Location: Michigan
Status: Offline
Reply With Quote
Jun 21, 2005, 12:08 PM
 
You've probably already done this but I'll say it just in case:
Have you checked if the machine has the JRE installed? You don't need the JDK since you won't be recompiling it at work. I believe (someone correct me if I'm wrong) the JRE is what gets installed when you install the java plugin for IE (pretty standard to have it, hopefully your company does). I think going to www.java.com will tell you if its installed or check CProgram Files\Java or CProgram Files\JavaSoft for it.

otherwise, search google for "java exe maker" and you should find plenty of apps to do the job.
     
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status: Offline
Reply With Quote
Jun 21, 2005, 01:00 PM
 
Originally Posted by apostacy
Could either of the above options be done without installing the JDK?
Well, there are some native Java compilers. But I suspect that you'll find them more trouble than they are worth.
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:17 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2