You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Mico

Beginner

  • "Mico" is male
  • "Mico" started this thread

Posts: 4

Date of registration: Nov 22nd 2009

Location: Italy

  • Send private message

1

Saturday, January 16th 2010, 3:37pm

EXEs don't work...

Hi everybody,

this is my first post and, obviously, it's about a problem. I have some very simple code that is working perfectly in the IDE, but, after compiling to an EXE, I can find the EXE, but it doesn't work. It seems it doesn't even try to run. Any hints?

Thanks evrybody, and all the best,

Michele

  • "Riaan Pretorius" is male

Posts: 21

Date of registration: Nov 14th 2009

Location: Krugersdorp, South Africa

Occupation: Linux Opensource Consultant

Hobbies: Programming

  • Send private message

2

Saturday, January 16th 2010, 5:36pm

Hi,

Do you have java installed?

R
I am ROOT if you see me laughing you better have a backup! :cursing:

Mico

Beginner

  • "Mico" is male
  • "Mico" started this thread

Posts: 4

Date of registration: Nov 22nd 2009

Location: Italy

  • Send private message

3

Sunday, January 17th 2010, 12:26am

Hi Riaan!

Yes. I have version 6 (build 1.6.0_17-b04), and I never noticed something wrong with java. When I compile a very simple SDI application (1 form, 1 button, 1 label that changes when I press the button), which perfectly runs in the IDE, I an EXE, but it just doesn't work. If I open the task manager, I can't see a process starting and then exiting. It just doesn't start. BTW, compiling to a JAR file produces an output file which is identical to the EXE in size (and it also has the same .exe extension), although it has a number of &C0 bytes instead od &CD. One last thing, Jabaco is 1.5.2, that i guess is the latest release. Should I try to reinstall?

Thanks a lot and all the best,

Michele

Mico

Beginner

  • "Mico" is male
  • "Mico" started this thread

Posts: 4

Date of registration: Nov 22nd 2009

Location: Italy

  • Send private message

4

Sunday, January 17th 2010, 10:33am

I'm replying to myself: reinstalling didn't help...

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

5

Sunday, January 17th 2010, 1:08pm

The exe is a self-unpacking jar. Whenever you execute the exe, it creates a jar in %TMP% and starts it via "java -jar yourProject.exe.jar".
You can try to execute your jar file manually. Does that work?

Verify that your PATH environment variable refers to the correct Java installation.
Check also environment variable JAVA_HOME.
A quick way to see your enviornment settings is to start a commandline box (cmd.exe)
and enter "set" or "echo %PATH%".

Use the Windows Java Control Panel to check your installed Java environments.
A clean-up might be necessary.

Search this forum for additional tips.

Success!

A1880

This post has been edited 1 times, last edit by "A1880" (Jan 17th 2010, 1:28pm)


Mico

Beginner

  • "Mico" is male
  • "Mico" started this thread

Posts: 4

Date of registration: Nov 22nd 2009

Location: Italy

  • Send private message

6

Sunday, January 17th 2010, 6:17pm

Thank a lot, A1880!

I added a JAVA_HOME entry pointing to my \bin folder in the latest Java installation (c:\Program Files\Java\jre6\bin) and that allowed launching .jar files. I tried the "java -jar myProject.exe.jar" trick and it worked, but just clicking myProject.exe.jar (after renaming to .jar) also worked. BTW, in case I select the compile-to-jar option, I always get an .exe file instead,

I also tried to add c:\Program Files\Java\jre6\bin to my path, but that didn't help to run the MyProject.exe. So, I monitored all the file activity using Process Monitor (www.sysinternals.com, but I downloaded mine from Microsoft) and in fact when I execute MyProject.exe there is a burst in file activity and everything runs smoothly, except a couple of file creation operations involving the c:\windows\system32\shell32.dll, that reported file creation problems.

I think tomorrow I'll try to compile using another PC. Maybe this help understanding what is wrong...

Thank aagain, and all the best,

Michele

Rate this thread
WoltLab Burning Board