We help IT Professionals succeed at work.

Refreshing of panels

paredes_mynor
on
218 Views
Last Modified: 2010-03-31
Hello.

I generated a Native executable file, from JBuilder.  The program shows certain panels when I click certain labels.  The program runs fine in my pc (Windows 2000 Pro), but I copied it to a WinXP one, and the panels are not shown if I don't kind of make a resize of the whole screen or window.  Is there any exception that I have to consider when running in different Windows OS's?  What should I do in these type of cases?   Revalidate or repaint the things?

Thanks for your response.
Mynor.
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016

Commented:
What happens when you run it as a jar file say?

Author

Commented:
The thing is that I don't have the concept of running a jar file.........  I have 2 files generated by the wizard........ one is .exe extension, and the other is a .jar file.
I haven't tried to run it as a jar file.

Thanks for your help.
CERTIFIED EXPERT
Top Expert 2016

Commented:
Running it as a jar file is a simple as this

a. if not 'executable' jar
java -classpath x.jar App

b. if executable jar

java -jar x.jar

Author

Commented:
What I have is and .exe extension file...........  and a .jar extension file.  I don't run it by java..........
I just run the .exe file.

Rgds.
CERTIFIED EXPERT
Top Expert 2016

Commented:
What i'm saying is DO try running it with java

Author

Commented:
Thanks........  that means that the target pc has to have the JDK in which the app was done, correct?  How do I install the JDK on that pc?

Sorry for the questions.  I'm not clear yet with the deployment step.......
Thanks again.
CERTIFIED EXPERT
Top Expert 2016

Commented:
It has to have a Java runtime that's capable of running it. Does it have one?

Author

Commented:
Maybe it would be better if you recommend me some sources where I can get clearly the concept of all this stuff.

Thanks.
CERTIFIED EXPERT
Top Expert 2016

Commented:
That's not easy as the area is rather wide and ill-defined in a way.

>>It has to have a Java runtime that's capable of running it. Does it have one?

This is another way of asking the same question as above:

what happens when you do

java -version

at the command line

If the answer is nothing, do a file search for java.exe

Author

Commented:
Ok, I'll try and tell you later soon.  Thanks a lot.

Commented:
Just to add my 2 cents worth....

a Jar file "is" an executable file just like your exe.  The difference being is the Jar file needs something to interpret it....i.e. the Java runtime environment(JRE).

An executable, on the other hand, depending on the OS, only needs the OS to run.

You can open the Jar file with a program such as winzip.  What you will find in that jar file is your classes, any icons, or other files that are associated with your Java program in addition to a Manifest file (see this link - http://oldlook.experts-exchange.com:8080/Programming/Programming_Languages/Java/Q_20911234.html)

My guess is that the exe file generated by JBuilder is nothing more than a simple file that calls the java command to execute the jar file.

The actual command to execute the jar file looks something like this:

java -jar jarfilename.jar  //note that your classpath needs to be set for this to work properly


<deep breath></deep breath>Now, since you have JBuilder installed on your machine, you also have the JRE installed on your machine.  This may or may not be the case of your users or other machines.  Sun provides a download for the JRE at http://java.sun.com/j2se/1.4.2/download.html so you can download and install it to your users or other machines (14.52 meg)

I don't know if any of this will help, but like I said, it's my 2 cents worth.  

Hi again CEHJ!!!
CERTIFIED EXPERT
Top Expert 2016

Commented:
>.Hi again CEHJ!!!

Hi. Yes, all that's right in general (although we're not sure of the executable [exe] details). I'm proceeding under the principle that you'll actually be less OS dependent if you use a jar and the commentary just given should suggest why to a certain extent. Of course, the principle collapses if there's no runtime (sometimes a runtime is somehow packed into the exe)

Commented:
I've used JBuilder before and was thouroughly dissapointed by it.  I've been using an IDE called Gel from www.gexperts.com and couldn't be any happier.

I didn't know they could pack the JRE into the executable....deliver it yes, package it???  That's a new one on me.

=-))
CERTIFIED EXPERT
Top Expert 2016

Commented:
>>I didn't know they could pack the JRE into the executable

Not saying that Borland do necessarily, but i think sometimes it happens. The jre is only a dll after all...

>>I've been using an IDE called Gel

what's that like on javadoc comments? Can it insert them automatically?
Java Developer
CERTIFIED EXPERT
Top Expert 2010
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
CEHJ

sure does

you type in /** hit enter and it displays for you

/**
 *
 */

it takes all the other javadoc identifiers too

@param etc... (it's been awhile since i've actually written a javadoc, did I get that right?)

what i like most about the editor is one step compiling and running.  I set up some keys to do so (F7 = Compile, F5=Run).  I havn't figured out how to enter break mode with it yet but I'm real pleased with it.

CYA

Commented:
I'll set up some screen shots for ya later.

Author

Commented:
Thank you all guys.  I appreciate all your help.

As CEHJ says, we're not sure about the [exe] details.  The pc where I ran it (not where I develop) doesn't have any JDK, so it seems like the [exe] brings the runtime to the jar........  I'll make some other tests and will keep you informed.......

Thanks again.

Author

Commented:
Anyway, thanks everyone for all your help.

Mynor.
Mick BarryJava Developer
CERTIFIED EXPERT
Top Expert 2010

Commented:
:)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.