Code Monkey home page Code Monkey logo

Comments (9)

code-disaster avatar code-disaster commented on July 25, 2024

What version of packr do you use exactly? The 1.6 installation prompt would have been an issue which was supposed to be fixed with #40.

from packr.

lorenberg avatar lorenberg commented on July 25, 2024

Hello,

actually this is not the error I am getting......I am not sure how I can check the packr version I am using, but I downloaded the one following the link the github project home page (linking to bit.ly/packrgdx).
The problem is that when I start the launcher with a double click on OSx (after renaming the output folder with a .app), it simply ignores the embedded openjdk.
For the moment, I used a workaround by creating an executable bash script and using it to start the embedded JVM, but it would be nice to be able to avoid this extra step.
As I told, I am not getting the missing JRE installation, but this seems to be something different.
And, by the way, I tried to use packr to create also the windows distribution with the .exe file, but in this case the .exe do nothing. I am using Launch4J as an alternative to create the .exe package, but having only one tool (and I would like to have packr which I think easier to reuse) would be better.

This is my config.json file, if needed

{
"platform": "mac",
"jdk": "openjdk-1.7.0-u45-unofficial-icedtea-2.4.3-macosx-x86_64-image.zip",
"executable": "Launcher",
"appjar": "myJarFile.jar",
"mainclass": "main_package/Main",
"vmargs": [
"-Xmx1G"
],
"outdir": "out"
}

Thanks again, let me know if I can help you with some other information.
BTW, I am forced to use the u45 JDK because using the u80 I got the X11 installation prompt.

from packr.

lorenberg avatar lorenberg commented on July 25, 2024

Sorry, a small correction for my previous post concerning windows: I forgot that only 32 bits is supported, so the code not executing that I was reporting before was the 64 bits.....
Windows 32 bits works perfectly without any problem.
Still open the question on OSx, on the other hand :)

from packr.

code-disaster avatar code-disaster commented on July 25, 2024

Try to run from a terminal and check the output.

first

open ./YourBundle.app

then

./YourBundle.app/Contents/MacOS/Launcher

If everything is set up right, both of them should work actually. Maybe the terminal output can give you some hints.

from packr.

lorenberg avatar lorenberg commented on July 25, 2024

Hi,

actually I already did this test, and the output was the following
SEVERE: null
javax.script.ScriptException: Exception in thread "main" java.lang.UnsupportedClassVersionError: firmware_updater/Firmware_Updater : Unsupported major.minor version 51.at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.lang.ClassLoader.loadClass(ClassLoader.java:247)ava:301)
at apple.applescript.AppleScriptEngine.evalScript(Native Method)
at apple.applescript.AppleScriptEngine.eval(AppleScriptEngine.java:368)
at apple.applescript.AppleScriptEngine.eval(AppleScriptEngine.java:339)
at firmware_updater.OSx_Main.main(OSx_Main.java:53)

So, I realized just now that the problem is simply that the AppleScriptEngine is not supported for the JVM version I am bundling! In fact, if I remove the call to that class (that I am actually needing because I need my program to run with root privileges......), the programs starts fine!

So, the problem is not with Packr, luckily :)))

This takes me to another question then......is there any way for Packr to require administrator privileges for running the application? Otherwise I should stick with my current solution......

Thanks again

from packr.

lorenberg avatar lorenberg commented on July 25, 2024

Hi again,

I was able to fix also this last problem by simply compiling my application with JVM 1.6 as a target :).
Anyhow, I would be curious to know if with packr you can specify to run an application with administrator privileges or not, and how can I recompile the native libraries you placed in (the xcode project missing stuff I was telling you before).

Thanks for the great work and for the indirect help in fixing the issue ;)

from packr.

code-disaster avatar code-disaster commented on July 25, 2024

Admin privileges: I don't know, never worked with them. "Unsupported major.minor version 51" actually means that the JRE tried to load, but does not understand Java 7 byte code.

Native compile: you say it complains about a missing Xcode project after running ./build-mac.sh? This could mean that premake4 isn't available/installed, or hasn't been found.

from packr.

shoon avatar shoon commented on July 25, 2024

I'm not sure if I should create a new issue for this but I'm noticing the packed JRE is not being used in my testing.... the system JRE is always being called on systems that have a java environment and environments without a JRE simply do not run.

Environment:

  • Windows 10 Enterprise x86_64
  • JDK 1.8u101 (installed, added the JCE Unlimited Policy, and then zipped)
  • Latest packr.jar from bitly link

Here's my packr config:

java -jar packr.jar --platform windows64 --jdk jre\winx86_64\jdk1.8.0_101.zip --executable ecc_test_packr --mainclass Capsule --classpath jar\ecc-tester-java-0.1-SNAPSHOT-capsule.jar --output output --vmargs Xmx1G --verbose

When I run the packr executable on a machine without a JRE, I get the following output

Loading JVM runtime library ...

When I run the packr executable on a machine with a JRE (but without the JCE) it runs but my main application detects the JCE Unlimited policy isn't available (i.e. it's using the system JRE not the one I packr'd)

from packr.

karlsabo avatar karlsabo commented on July 25, 2024

This issue is quite old, if you run into any issues with the latest version of packr please open a new issue.

from packr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.