Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

need help on compatibility problem!

Thread view: 
NeoGeoSNK - 10 Oct 2006 04:27 GMT
I receive an Exception when excute a jar that compiled from jdk
1.5.0_08:
"do not use gui.GUI.add(), use gui.GUI.getContentPane().add instead" on
jvm 1.4.2_08
However, i don't want to change the source code :). Is there sb can
give me some suggestion?
Thanks very much!
Andrew Thompson - 10 Oct 2006 05:11 GMT
> I receive an Exception when excute a jar that compiled from jdk
> 1.5.0_08:
> "do not use gui.GUI.add(), use gui.GUI.getContentPane().add instead" on
> jvm 1.4.2_08
> However, i don't want to change the source code :). Is there sb can
> give me some suggestion?

Mark your project as 1.5+?

Andrew T.
NeoGeoSNK - 10 Oct 2006 06:55 GMT
> > I receive an Exception when excute a jar that compiled from jdk
> > 1.5.0_08:
[quoted text clipped - 6 lines]
>
> Andrew T.

Hello Andrew Thompson,
what does "Mark" mean?
Andrew Thompson - 10 Oct 2006 07:21 GMT
> > > I receive an Exception when excute a jar that compiled from jdk
> > > 1.5.0_08:
[quoted text clipped - 4 lines]
> >
> > Mark your project as 1.5+?
...
> Hello Andrew Thompson,
> what does "Mark" mean?

I.E. launch it using webstart, and in the JNLP..

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" codebase="http://.." href="the.jnlp">
 <information>
   <title>Title</title>
   <vendor>Vendor</vendor>
 </information>
   <resources>
     <j2se
       href="http://java.sun.com/products/autodl/j2se"
       version="1.5+"/>
....

Andrew T.
NeoGeoSNK - 10 Oct 2006 07:48 GMT
> > > > I receive an Exception when excute a jar that compiled from jdk
> > > > 1.5.0_08:
[quoted text clipped - 23 lines]
>
> Andrew T.

Thanks for you greate help
I'll try it :)
NeoGeoSNK - 10 Oct 2006 08:46 GMT
> > > > I receive an Exception when excute a jar that compiled from jdk
> > > > 1.5.0_08:
[quoted text clipped - 23 lines]
>
> Andrew T.
Hello Andrew T.
the program must access local files, if I launch it using webstart,
should i use JNLP API to accomplish this? so i also need to modify the
original source code? in addition ,how can i config the
"codebase="http://.." if the jnlp file is in current directory? the
only way i know is like: codebase="file:///D:\...", but it's a absolute
path,
^ ^"Thanks.
Andrew Thompson - 10 Oct 2006 09:37 GMT
> > > > > I receive an Exception when excute a jar that compiled from jdk
> > > > > 1.5.0_08:
> > > > > "do not use gui.GUI.add(), use gui.GUI.getContentPane().add instead" on
> > > > > jvm 1.4.2_08
> > > > > However, i don't want to change the source code :). Is there sb can
> > > > > give me some suggestion?
...
> > I.E. launch it using webstart, and in the JNLP..
> >
> > <?xml version="1.0" encoding="utf-8"?>
..
> >         href="http://java.sun.com/products/autodl/j2se"
> >         version="1.5+"/>
..
> the program must access local files, if I launch it using webstart,
> should i use JNLP API to accomplish this?

A webstart application can access local files at least two ways.
1)  unstrusted app. using the JLNP API FileService, but if you do
not want to alter the code, the other option is to ..
2)  sign it, and request either all-permissions or
j2ee-client-application-premissions in the JNLP launch file.

>..so i also need to modify the
> original source code?

Option 1) yes, option 2) no.

>..in addition ,how can i config the
> "codebase="http://.." if the jnlp file is in current directory? the
> only way i know is like: codebase="file:///D:\...", but it's a absolute
> path,

A JNLP launch file can be tested this way..
Open a command prompt pointing to the directory of the
JNLP file, then type (something like)..

 javaws -codebase file:. file:./thejnlp.jnlp

..that should load the WebStart manager, replacing the
codebase in 'thejnlp.jnlp' with the current directory.

(Note the codebase in the JNLP file can be a complete
lie, the launch file does not need to exist on the net, for
this to work)

HTH

Andrew T.
NeoGeoSNK - 10 Oct 2006 12:23 GMT
> > > > > > I receive an Exception when excute a jar that compiled from jdk
> > > > > > 1.5.0_08:
[quoted text clipped - 45 lines]
>
> Andrew T.
Thanks a lot Andrew T
I'll select Option 2). ^ ^ i hope i can accomplish this problem
according to your help.
But I found i realy can't distinguish the "file:",  "file:." , and
"file:///" :'(
I write a  jnlp  test file below and they are all ok
<jnlp codebase="file:." href="file:D:\c14\jnlp\filechooser.jnlp">
<jnlp codebase="file:"  href="file:///D:\c14\jnlp\filechooser.jnlp">
<jnlp codebase="file:." href="file:\filechooser.jnlp">
<jnlp codebase="file:"  href="file:\filechooser.jnlp">


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.