Author Topic: java -> .exe?  (Read 2241 times)

0 Members and 1 Guest are viewing this topic.

Offline aldo_14

  • Gunnery Control
  • 213
Anyone know of a method / app  that performs this before I go and search the sun website?  I know of one, but it's trialware and puts message on running the compilerd program  - and I don't want to pay.

Cheers in advance.

 

Offline Joey_21

  • 28
    • http://denebsystem.cjb.net/
My advice: Learn C++. Alot of the syntax is the same so there really isn't all that much to learn. I found porting code from Java to C++ to be pretty easy back when I began taking C++ classes. Augh, it's been a long time since I used Java for anything though. :doubt:

 

Offline aldo_14

  • Gunnery Control
  • 213
Quote
Originally posted by Joey_21
My advice: Learn C++. Alot of the syntax is the same so there really isn't all that much to learn. I found porting code from Java to C++ to be pretty easy back when I began taking C++ classes. Augh, it's been a long time since I used Java for anything though. :doubt:


If I wanted to port back around 10000 lines of WIP project code using java, I would.  But it's completely unfeasible justnow - I specifically wrote the app in java because I know the libraries.... i need an exe to more easily distribute it for testing.

 

Offline vyper

  • 210
  • The Sexy Scotsman
aldo mate, isn't this completely raping the theory behind the purpose of the JRE and java being cross platform compatible? :wtf:

Anyway....
I can't find anything on the net that's freeware to do this. HOWEVER - is it possible Strathy has some software that can do it? Or does Microsoft? You could get it over the MSDN Academic Alliance.

I'll be quiet now. :bleh:
"But you live, you learn.  Unless you die.  Then you're ****ed." - aldo14

 

Offline aldo_14

  • Gunnery Control
  • 213
Quote
Originally posted by vyper
aldo mate, isn't this completely raping the theory behind the purpose of the JRE and java being cross platform compatible? :wtf:

Anyway....
I can't find anything on the net that's freeware to do this. HOWEVER - is it possible Strathy has some software that can do it? Or does Microsoft? You could get it over the MSDN Academic Alliance.

I'll be quiet now. :bleh:


Yes, it's merely for convenience because I'll probably be distributing it to a few people for testing, who may not necessarily know how to run a java program from the command line and almost certainly won't have classpaths set up (ruling out a bat).  Although they'll probably still need the JRE, it'll at least make it easier for 'em.

I'll have to do a few runtime tests on Unix / Linux now I think of it....

I think Borland JBuilder may be able to do it, but can;t check till I go back to uni on Monday.    There is sod all chance of an MSDN tool, though, as Microsoft seem to detest the cross-platform nature of Java - they were successfulkly sued by sun for creating a java compiler that would only compile windows compatible code.  I believe Ms have a bastardization of Java called J# or J++, although I've yet to encounter anyone who's used it or wanted to.

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Why can't you just stuff the whole thing in a .jar and distribute that?
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline aldo_14

  • Gunnery Control
  • 213
Quote
Originally posted by mikhael
Why can't you just stuff the whole thing in a .jar and distribute that?


I haven;t found anything on self-executable jar files yet, only command-line execution.  I've been considering it, granted.

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Take 1 jar, add 1 batch file and voila. ;)
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline aldo_14

  • Gunnery Control
  • 213
Quote
Originally posted by mikhael
Take 1 jar, add 1 batch file and voila. ;)


Stills needs the classpath to be configured, IIRC.

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
You do that in your batch file.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline aldo_14

  • Gunnery Control
  • 213
Quote
Originally posted by mikhael
You do that in your batch file.


The classpath is installation dependent, I think.  Unless there's some way to fetch it I don't know of.

 

Offline vyper

  • 210
  • The Sexy Scotsman
"But you live, you learn.  Unless you die.  Then you're ****ed." - aldo14

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Just add something like:
Code: [Select]

set CLASSPATH=%CLASSPATH%;.

This way, if a CLASSPATH variable already exists, its preserved and the current path is appended. If it doesn't exist, its created and ";." becomes the first entry.

That should take care of most of your problems right there.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline aldo_14

  • Gunnery Control
  • 213
Quote
Originally posted by mikhael
Just add something like:
Code: [Select]

set CLASSPATH=%CLASSPATH%;.

This way, if a CLASSPATH variable already exists, its preserved and the current path is appended. If it doesn't exist, its created and ";." becomes the first entry.

That should take care of most of your problems right there. [/B]


s'interesting.  I'll give that a shot, then - cheers.

 

Offline Kamikaze

  • A Complacent Wind
  • 29
    • http://www.nodewar.com
Using a JIT compiler, you can make native binaries.

http://www.xlsoft.com/en/products/jet/jetfeature.html <-- like this
« Last Edit: February 06, 2004, 07:52:24 pm by 179 »
Science alone of all the subjects contains within itself the lesson of the danger of belief in the infallibility of the greatest teachers in the preceding generation . . .Learn from science that you must doubt the experts. As a matter of fact, I can also define science another way: Science is the belief in the ignorance of experts. - Richard Feynman

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
never use java
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline vyper

  • 210
  • The Sexy Scotsman
[q]never use java[/q]

What's your beef with the beans?
"But you live, you learn.  Unless you die.  Then you're ****ed." - aldo14

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
That, Kaz, is like saying 'never use a hammer'. That's dumb. Use the right tool for the job. Unfortunately, Java is very rarely the right tool for the job. ;)

Java is very, very good in its niche. Its very very bad when you attempt to use it outside its niche. ITs like almost every other language.

Of course, I say use Python anywhere you want to use Java. Its generally as fast, faster to start up and has a much smaller memory footprint. But I'm a freak.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Give me an instance of when java is the right tool and I'll give you a better tool
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Easy: Java is the exact right thing to use on a hardware java machine, like some embedded devices.

Java is also pretty good for doing small, fast (I know, its an oxymoron: small, fast java) programs for PDAs. Java is your friend if you do stuff for the Sharp Zaurus. Yes, you could use QT and C, but you'll fight for it every inch of the way. Java is a lot easier and faster to work with there. Java is, likewise, the right tool for cell phones, for similar reasons. Basically anywhere its cheap and easy to put the JVM in hardware, Java is the right tool. Anywhere you can't put the JVM in hardware, Java is the wrong tool.
[I am not really here. This post is entirely a figment of your imagination.]