Thread View: borland.public.jbuilder.java.swing
6 messages
6 total messages
Started by David Bolsover
Thu, 10 Mar 2005 14:43
JB2005, Windows ME & JVM 1.5
Author: David Bolsover
Date: Thu, 10 Mar 2005 14:43
Date: Thu, 10 Mar 2005 14:43
19 lines
1441 bytes
1441 bytes
Hi all I just found a curious problem - is this a bug? I have a swing application that uses some JDK 1.5 specific libraries & has been compled to a native windows executable using the JB2005 wizard. The app runs just fine on an XP machine but fails on an ME box with an exception in KERNEL. Has anyone else seen similar problems / have solution? Rolling the app back to use older, non JDK 1.5 specific libraries and compiling against JDK 1.4, the app runs just fine. I suspect that the problem lies in the Borland .exe wrapper since it always runs OK when launched from the .jar no matter what the target JVM. db
Re: JB2005, Windows ME & JVM 1.5
Author: John McGrath [TeamB]
Date: Sat, 12 Mar 2005 02:02
Date: Sat, 12 Mar 2005 02:02
33 lines
2195 bytes
2195 bytes
On 3/10/2005 at 9:43:02 AM, David Bolsover wrote:
> I have a swing application that uses some JDK 1.5 specific libraries &
> has been compled to a native windows executable using the JB2005 wizard.
>
> The app runs just fine on an XP machine but fails on an ME box with an
> exception in KERNEL.
>
> Has anyone else seen similar problems / have solution?
>
> Rolling the app back to use older, non JDK 1.5 specific libraries and
> compiling against JDK 1.4, the app runs just fine.
>
> I suspect that the problem lies in the Borland .exe wrapper since it
> always runs OK when launched from the .jar no matter what the target JVM.
I just tried it and got the exception also. However, even when I
generated Java 1.4 code, I saw the problem.
You were not very specific about the JVM you used to run the program. Did
you run with JDK 1.5 in both cases? Or did you switch to JDK 1.4? I
think you would have had to re-install, or at least set some registry
settings, unless you have set up a config file that points to the JDK.
FYI, I was running against JDK 1.5.0_02 in both cases.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: JB2005, Windows ME & JVM 1.5
Author: David Bolsover
Date: Sun, 13 Mar 2005 11:18
Date: Sun, 13 Mar 2005 11:18
66 lines
3633 bytes
3633 bytes
John Thanks for the reply More detail: 1 Compile using JB2005, JDK1.5 and JDK1.5 specific libraries and run on ME, JVM 1.5 - Exception in Kernel 2 Compile using JB2005, JDK1.5 and JDK1.5 specific libraries and run on XP, JVM 1.5 - OK 3 Compile using JBX, JDK1.4 and JDK1.4 specific libraries and run on ME, JVM 1.5/1.4 - OK 4 Compile using JBX, JDK1.4 and JDK1.4 specific libraries and run on XP, JVM 1.5/1.4 - OK In all cases. I am compiling to Windows executable - the only problem is with JB2005 + JDK1.5 + ME + JVM 1.5. I'd like to do more testing - in particular JB2005 + JDK1.4 + ME + JVM 1.4.- but don't have an ME client available locally (yet). Also, in all cases, the app runs just fine if I launch from the .jar file rather than and .exe. It looks like the problem is associated with the JB2005 + JDK1.5 + ME + JVM 1.5 combination - but you also saw this with 1.4 code - could it be that the problem lies in a difference between the .exe generated by JBX/JB2005? - Do you know id the .exe code has been changed? db "John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message news:xn0dzmx5hzeoju003@newsgroups.borland.com... > On 3/10/2005 at 9:43:02 AM, David Bolsover wrote: > >> I have a swing application that uses some JDK 1.5 specific libraries & >> has been compled to a native windows executable using the JB2005 wizard. >> >> The app runs just fine on an XP machine but fails on an ME box with an >> exception in KERNEL. >> >> Has anyone else seen similar problems / have solution? >> >> Rolling the app back to use older, non JDK 1.5 specific libraries and >> compiling against JDK 1.4, the app runs just fine. >> >> I suspect that the problem lies in the Borland .exe wrapper since it >> always runs OK when launched from the .jar no matter what the target JVM. > > I just tried it and got the exception also. However, even when I > generated Java 1.4 code, I saw the problem. > > You were not very specific about the JVM you used to run the program. Did > you run with JDK 1.5 in both cases? Or did you switch to JDK 1.4? I > think you would have had to re-install, or at least set some registry > settings, unless you have set up a config file that points to the JDK. > FYI, I was running against JDK 1.5.0_02 in both cases. > > -- > Regards, > > John McGrath [TeamB] > > --------------------------------------------------- > Before sending me e-mail, please read: > http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: JB2005, Windows ME & JVM 1.5
Author: John McGrath [TeamB]
Date: Mon, 14 Mar 2005 23:27
Date: Mon, 14 Mar 2005 23:27
71 lines
4049 bytes
4049 bytes
On 3/13/2005 at 6:18:43 AM, David Bolsover wrote:
> More detail:
> 1 Compile using JB2005, JDK1.5 and JDK1.5 specific libraries and run on
> ME, JVM 1.5 - Exception in Kernel
> 2 Compile using JB2005, JDK1.5 and JDK1.5 specific libraries and run on
> XP, JVM 1.5 - OK
> 3 Compile using JBX, JDK1.4 and JDK1.4 specific libraries and run on ME,
> JVM 1.5/1.4 - OK
> 4 Compile using JBX, JDK1.4 and JDK1.4 specific libraries and run on XP,
> JVM 1.5/1.4 - OK
FYI, I tried:
JB2005 + JDK 1.5 / ME, JRE 1.5 - Error
JB2005 + JDK 1.4 / ME, JRE 1.5 - Error
> I'd like to do more testing - in particular JB2005 + JDK1.4 + ME + JVM
> 1.4.- but don't have an ME client available locally (yet).
Yes, that would be a useful data point.
> Also, in all cases, the app runs just fine if I launch from the .jar
> file rather than and .exe.
Yes, that was the same for me.
> It looks like the problem is associated with the JB2005 + JDK1.5 + ME +
> JVM 1.5 combination - but you also saw this with 1.4 code - could it be
> that the problem lies in a difference between the .exe generated by
> JBX/JB2005?
Yes, I suspect that is the case. It could be that the EXE generated by
JBuilder 2005 has problems loading both JRE 1.4 and JRE 1.5, or it could
be isolated to JRE 1.5. The one additional test you mentioned would clear
that up.
> Do you know id the .exe code has been changed?
The code has definitely changed, although I do not know what the changes
involved. It is not too hard to see that it has changed, if you know how
the native executable builder works. Just look at the launcher programs
used to launch JBuilder in the two different JBuilder versions. It is the
same program used to make the native executables.
When JBuilder builds a native executable, what it does is build a JAR
file, then concatenate the JBuilder launcher and the JAR file, creating a
single executable file. Windows executables are built (and read) from the
front, so if you tack some junk onto the end, it has no effect. ZIP and
JAR files are built from the back, so if you tack some junk onto the
beginning, it has no effect.
When you run the combined executable / JAR, this runs the Java launcher.
It places the executable file itself (which is also the JAR file) on the
classpath and starts the JVM. There are a few more interesting details:
for example the configuration information, like the JBuilder.config file,
is stored in the ZIP comment, but that is basically how it works.
You should be able to construct a native executable yourself in JBuilder
2005, using the JBuilder executable from JBuilder X. In fact, as a simple
test, you can just take the native executable you built, and tack the
JBuilder X launcher on to the front of it. With my test program, that
works fine on Windows ME.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: JB2005, Windows ME & JVM 1.5
Author: David Bolsover
Date: Wed, 16 Mar 2005 22:54
Date: Wed, 16 Mar 2005 22:54
91 lines
4685 bytes
4685 bytes
John Thanks again.. but I'm not sure what you did.. > You should be able to construct a native executable yourself in JBuilder > 2005, using the JBuilder executable from JBuilder X. In fact, as a simple > test, you can just take the native executable you built, and tack the > JBuilder X launcher on to the front of it.... How? Also, do you think this is an issue for Quality Central? db "John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message news:xn0dzr0ot544akv00a@newsgroups.borland.com... > On 3/13/2005 at 6:18:43 AM, David Bolsover wrote: > >> More detail: >> 1 Compile using JB2005, JDK1.5 and JDK1.5 specific libraries and run on >> ME, JVM 1.5 - Exception in Kernel >> 2 Compile using JB2005, JDK1.5 and JDK1.5 specific libraries and run on >> XP, JVM 1.5 - OK >> 3 Compile using JBX, JDK1.4 and JDK1.4 specific libraries and run on ME, >> JVM 1.5/1.4 - OK >> 4 Compile using JBX, JDK1.4 and JDK1.4 specific libraries and run on XP, >> JVM 1.5/1.4 - OK > > FYI, I tried: > JB2005 + JDK 1.5 / ME, JRE 1.5 - Error > JB2005 + JDK 1.4 / ME, JRE 1.5 - Error > >> I'd like to do more testing - in particular JB2005 + JDK1.4 + ME + JVM >> 1.4.- but don't have an ME client available locally (yet). > > Yes, that would be a useful data point. > >> Also, in all cases, the app runs just fine if I launch from the .jar >> file rather than and .exe. > > Yes, that was the same for me. > >> It looks like the problem is associated with the JB2005 + JDK1.5 + ME + >> JVM 1.5 combination - but you also saw this with 1.4 code - could it be >> that the problem lies in a difference between the .exe generated by >> JBX/JB2005? > > Yes, I suspect that is the case. It could be that the EXE generated by > JBuilder 2005 has problems loading both JRE 1.4 and JRE 1.5, or it could > be isolated to JRE 1.5. The one additional test you mentioned would clear > that up. > >> Do you know id the .exe code has been changed? > > The code has definitely changed, although I do not know what the changes > involved. It is not too hard to see that it has changed, if you know how > the native executable builder works. Just look at the launcher programs > used to launch JBuilder in the two different JBuilder versions. It is the > same program used to make the native executables. > > When JBuilder builds a native executable, what it does is build a JAR > file, then concatenate the JBuilder launcher and the JAR file, creating a > single executable file. Windows executables are built (and read) from the > front, so if you tack some junk onto the end, it has no effect. ZIP and > JAR files are built from the back, so if you tack some junk onto the > beginning, it has no effect. > > When you run the combined executable / JAR, this runs the Java launcher. > It places the executable file itself (which is also the JAR file) on the > classpath and starts the JVM. There are a few more interesting details: > for example the configuration information, like the JBuilder.config file, > is stored in the ZIP comment, but that is basically how it works. > > You should be able to construct a native executable yourself in JBuilder > 2005, using the JBuilder executable from JBuilder X. In fact, as a simple > test, you can just take the native executable you built, and tack the > JBuilder X launcher on to the front of it. With my test program, that > works fine on Windows ME. > > -- > Regards, > > John McGrath [TeamB] > > --------------------------------------------------- > Before sending me e-mail, please read: > http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: JB2005, Windows ME & JVM 1.5
Author: John McGrath [TeamB]
Date: Thu, 17 Mar 2005 02:20
Date: Thu, 17 Mar 2005 02:20
64 lines
4092 bytes
4092 bytes
On 3/16/2005 at 5:54:51 PM, David Bolsover wrote:
> Thanks again.. but I'm not sure what you did..
>
> > You should be able to construct a native executable yourself in
> > JBuilder 2005, using the JBuilder executable from JBuilder X. In
> > fact, as a simple test, you can just take the native executable you
> > built, and tack the JBuilder X launcher on to the front of it....
Are you talking about how I tacked the JBuilder launcher on to the front
of it? I am not sure if this is what you were referring to, since you
placed that quote after your comment.
Assuming that is it, I just concatenated the two files. I actually used
the "cat" command from the CygWin toolkit, but the plain old Windows COPY
command will do the same thing. I think the syntax is:
COPY JBuilder.exe + Native.exe NewNative.exe
In the above, JBuilder.exe is the JBuilder executable from the JBuilder X
/bin directory and Native.exe is the native executable that you generated
using JBuilder 2005. The resulting NewNative.exe should run on Windows ME.
Of course, you will probably want to do this differently in production,
since NewNative.exe will contain an copy of the JBuilder 2005 Java
launcher that is not used. You should be able to just create a JAR file
and and append it to the JBuilder X launcher. For example:
COPY JBuilder.exe + App.jar App.exe
With the above approach, you will also need to place the configuration
information in the ZIP comment of the JAR file. You can build a native
executable using the normal means and then examine the ZIP comment to see
what is needed.
Another approach is to package your files the same way that JBuilder is
packaged. Instead of appending the JAR file to the executable, you can
place the JAR file in the same directory as the executable, along with a
.config file. This would eliminate the need to set the ZIP comment for
the JAR file before you concatenate the file. It also eliminates the need
to have duplicates of all of your classes if you want to include both
Windows and command line versions of the program. This technique is
described here:
http://bdn.borland.com/article/0,1410,22496,00.html
It is important to note that if you build an executable using the JBuilder
launcher executable, there may be some licensing implications, even though
that is the same executable used by the native executable builder. Of
course, I am not a lawyer, nor do I speak for Borland, so you will want to
review the license issues yourself, with whatever legal help you feel is
necessary. There is an article on the Borland community site about using
the launcher:
http://community.borland.com/article/0,1410,27562,00.html
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads