#8 Problems with Locale

closed-fixed
None
5
2006-04-28
2006-04-27
No

Hi, I'm a newbie to Launch4j.
I have java(ver 1.4.2_06) and ant(ver 1.6.5) installed
on my box.

I need launch4j for our project as I need it to be
able to package a swing app, an embedded database and
also an embedded jre all into the one executable.

So, I've download the latest 2.1.2 version and have
installed it.
I then rebuilt the launch4j.jar file by executing the
ant script with the 'jar' target in the root folder.
This successfully created me a new launch4j.jar file.

I then went to the demo folder, namely the SimpleApp
folder and ran the 'compile', 'jar' and then the 'exe'
ant targets. The 'compile' and 'jar' targets compiled
successfully, but I get a failure when running
the 'exe' target to do with my locale. I ran the ant
with -debug option, i.e ant exe -debug

Any help would be great, I reiterate I'm a newbie.
Interested to know if anyone else has had trouble
building the SimpleApp.
Here is the trail end of my stack trace.....

Class net.sf.launch4j.config.Messages loaded from ant
loader (parentFirst)
Class java.util.MissingResourceException loaded from
parent loader (parentFirst)
Class java.util.ResourceBundle loaded from parent
loader (parentFirst)
Finding class net.sf.launch4j.config.messages
Couldn't load ResourceStream for
net/sf/launch4j/config/messages.properties
Finding class net.sf.launch4j.config.messages_en
Couldn't load ResourceStream for
net/sf/launch4j/config/messages_en.properties
Finding class net.sf.launch4j.config.messages_en_AU
Couldn't load ResourceStream for
net/sf/launch4j/config/messages_en_AU.properties

BUILD FAILED
java.lang.ExceptionInInitializerError
at
org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1225)
at org.apache.tools.ant.Project.executeTarget
(Project.java:1185)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTarg
ets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets
(Project.java:1068)
at org.apache.tools.ant.Main.runBuild
(Main.java:668)
at org.apache.tools.ant.Main.startAnt
(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run
(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main
(Launcher.java:67)
Caused by: java.lang.ExceptionInInitializerError
at
net.sf.launch4j.config.Config.checkInvariants
(Config.java:69)
at net.sf.launch4j.config.Config.validate
(Config.java:94)
at net.sf.launch4j.Builder.build
(Builder.java:52)
at net.sf.launch4j.ant.Launch4jTask.execute
(Launch4jTask.java:90)
at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform
(Task.java:364)
at org.apache.tools.ant.Target.execute
(Target.java:341)
at org.apache.tools.ant.Target.performTasks
(Target.java:369)
at
org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1216)
... 7 more
Caused by: java.util.MissingResourceException: Can't
find bundle for base name
net.sf.launch4j.config.messages, locale e
n_AU
at
java.util.ResourceBundle.throwMissingResourceException
(ResourceBundle.java:839)
at java.util.ResourceBundle.getBundleImpl
(ResourceBundle.java:808)
at java.util.ResourceBundle.getBundle
(ResourceBundle.java:552)
at net.sf.launch4j.config.Messages.<clinit>
(Messages.java:31)
... 16 more
--- Nested Exception ---
java.lang.ExceptionInInitializerError

Discussion

  • Grzegorz Kowal

    Grzegorz Kowal - 2006-04-27

    Logged In: YES
    user_id=917657

    Thanks for the report, I'll check that.

    >I need launch4j for our project as I need it to be
    able to package a swing app, an embedded database and
    also an embedded jre all into the one executable.

    Use Launch4j on the swing app jar to create an application
    exe, and then an installer to pack all the files in one
    executable. NSIS and InnoSetup are very good.

    Grzegorz

     
  • Grzegorz Kowal

    Grzegorz Kowal - 2006-04-27
    • assigned_to: nobody --> grzegok
     
  • fredflintstone

    fredflintstone - 2006-04-27

    Logged In: YES
    user_id=1511160

    thanks Grzegorz,
    for the info regarding installers (NSIS & InnoSetup).

    At the momement, I still can't get past the
    MissingResourceException - Can't find bundle for base name
    net.slf.launch4j.config.messages, locale en_AU.

    This is stopping me building the initial Swing app into an
    executable.

    You mentioned you're checking it, so as soon as you have
    any info that could help, it'd be appreciated.
    thanks.

     
  • fredflintstone

    fredflintstone - 2006-04-28

    Logged In: YES
    user_id=1511160

    Grzegorz,
    I've since got it to work by changing my locale to English
    (United States).
    To replicate my problem, assuming you're running Windows,
    go to Settings/Control Panel/Region Options and try
    changing your locale to English(Australia). Run 'ant exe'
    on the SimpleApp project. You should get the issue I'm
    talking about.
    I assume then that anyone in Australia would be striking
    this locale problem.
    thanks.

     
  • Grzegorz Kowal

    Grzegorz Kowal - 2006-04-28
    • status: open --> closed-fixed
     
  • Grzegorz Kowal

    Grzegorz Kowal - 2006-04-28

    Logged In: YES
    user_id=917657

    It was a bug in launch4j build file. It didn't copy the
    messages so the rebuilt launch4j.jar was incomplete.
    I've attached the corrected script.

    Grzegorz

     
  • Grzegorz Kowal

    Grzegorz Kowal - 2006-04-28

    launch4j build file

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks