Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

Refreshing of panels

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
paredes_mynor
Asked:
paredes_mynor
  • 7
  • 7
  • 4
  • +1
1 Solution
 
CEHJCommented:
What happens when you run it as a jar file say?
0
 
paredes_mynorAuthor 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.
0
 
CEHJCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
paredes_mynorAuthor 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.
0
 
CEHJCommented:
What i'm saying is DO try running it with java
0
 
paredes_mynorAuthor 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.
0
 
CEHJCommented:
It has to have a Java runtime that's capable of running it. Does it have one?
0
 
paredes_mynorAuthor Commented:
Maybe it would be better if you recommend me some sources where I can get clearly the concept of all this stuff.

Thanks.
0
 
CEHJCommented:
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
 
paredes_mynorAuthor Commented:
Ok, I'll try and tell you later soon.  Thanks a lot.
0
 
dds110Commented:
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
 
CEHJCommented:
>.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
 
dds110Commented:
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
 
CEHJCommented:
>>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
 
objectsCommented:
After adding/removing panels from your gui make sure you call:
revalidate();
repaint();
0
 
dds110Commented:
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
 
dds110Commented:
I'll set up some screen shots for ya later.
0
 
paredes_mynorAuthor 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.
0
 
paredes_mynorAuthor Commented:
Anyway, thanks everyone for all your help.

Mynor.
0
 
objectsCommented:
:)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 7
  • 7
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now