Solved

Refreshing of panels

Posted on 2004-03-30
21
196 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
 

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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

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)
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now