Solved

Refreshing of panels

Posted on 2004-03-30
21
199 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.
0
Comment
Question by:paredes_mynor
  • 7
  • 7
  • 4
  • +1
21 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10715926
What happens when you run it as a jar file say?
0
 

Author Comment

by:paredes_mynor
ID: 10715942
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.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10715984
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
0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

Author Comment

by:paredes_mynor
ID: 10716043
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.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10716066
What i'm saying is DO try running it with java
0
 

Author Comment

by:paredes_mynor
ID: 10716114
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.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10716160
It has to have a Java runtime that's capable of running it. Does it have one?
0
 

Author Comment

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

Thanks.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10716282
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
0
 

Author Comment

by:paredes_mynor
ID: 10716303
Ok, I'll try and tell you later soon.  Thanks a lot.
0
 
LVL 8

Expert Comment

by:dds110
ID: 10717106
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!!!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10717199
>.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)
0
 
LVL 8

Expert Comment

by:dds110
ID: 10717287
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.

=-))
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10717364
>>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?
0
 
LVL 92

Accepted Solution

by:
objects earned 250 total points
ID: 10717980
After adding/removing panels from your gui make sure you call:
revalidate();
repaint();
0
 
LVL 8

Expert Comment

by:dds110
ID: 10718122
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
0
 
LVL 8

Expert Comment

by:dds110
ID: 10718125
I'll set up some screen shots for ya later.
0
 

Author Comment

by:paredes_mynor
ID: 10718674
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.
0
 

Author Comment

by:paredes_mynor
ID: 10880685
Anyway, thanks everyone for all your help.

Mynor.
0
 
LVL 92

Expert Comment

by:objects
ID: 10884145
:)
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android studio getdrawable(int) is deprecated 4 86
web services creation SOAP vs REST 5 42
reverse digits of a number using for loop 5 45
Java: anonymous class 4 22
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)
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

803 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