The dockerfile is:
FROM adoptopenjdk/openjdk11:x86_64-alpine-jdk-11.0.6_10
RUN apk update && apk upgrade
# install base modules, python, node.js (java comes with)
RUN apk add --update-cache \
bash \
ttf-dejavu \
python3==3.7.7 \
build-base \
nodejs \
npm \
git \
&& rm -rf /var/cache/apk/*
And this gives me en error:
ERROR: unable to select packages:
python3-3.8.10-r0:
breaks: world[python3=3.7.7]
Any ideas?
It seems like the error is in defining the specific version of python3.
You can set specific versions like this:
# Both are equal
apk add package=1.2.3-suffix
apk add 'package<1.2.3-suffix'
See https://stschindler.medium.com/the-problem-with-docker-and-alpines-package-pinning-18346593e891 Alpine Linux most likely no longer has the package for 3.7.7 that you are asking for
On macOS, the command-line option -Bmac.CFBundleVersion=<value> specified in the documentation of Oracle javapackager utility does not work.
I am using the following command to create the disk image Application.app from Application.jar:
javapackager \
-deploy \
-native image \
-srcfiles Application.jar \
-outdir dist \
-outfile Application \
-appclass Application \
-BappVersion=2.0 \
-Bmac.CFBundleVersion=2.0.0 \
-BjvmOptions=-Dapple.laf.useScreenMenuBar=true
The popup window opened from the "About Application" item in the menu bar displays the following string:
Application
Version 2.0 (100)
instead of
Application
Version 2.0 (2.0.0)
When I check the generated Application.app/Contents/Info.plist file, I see that javapackager correctly read the command-line option -BappVersion=2.0 to set the value of the key CFBundleShortVersionString, but failed to read the command-line option -Bmac.CFBundleVersion=2.0.0 to set the value of the key CFBundleVersion:
<key>CFBundleShortVersionString</key>
<string>2.0</string>
<key>CFBundleVersion</key>
<string>100</string>
I was using an old version (update 25) of the Java SE Development Kit 8. I downloaded and installed the last version (update 121) from Oracle's website (jdk-8u121-macosx-x64.dmg) and it solved the problem. Thank you #Nicolas Filotto.
Good morning guys,
I'm trying to create a JAR in NetBeans, but I get messages:
C: \ Users \ Administrator \ Desktop \ Project \ nbproject \ build-impl.xml: 993: The Following error occurred while executing this line:
C: \ Users \ Administrator \ Desktop \ Project \ nbproject \ build-impl.xml: 837: copylibs does not support the "excludeFromCopy" attribute
NetBeans does not generate the .JAR because of the errors.
My specs:
Version of OS = Windows 7 64 Bit
Java version = 1.7.0_55
Netbeans version = 7.0.1
This looks like an existing bug. The simplest course of action would probably be to upgrade to the latest version of Netbeans.
Alternatively, you can create a new project and copy your source files over - it may solve the problem.
I have properly installed jdk in my system, I have also set the CLASSPATH properly, but when I am installing ArgoUML, it shows a Message the No JRE found, what should I do?
I've just had this problem too, with a properly installed x64 JRE 8u45. Don't know if the Windows exe installer expects an x86 jvm?
Anyway, download the binary package zip instead from Tigris (dead) GitHub Releases and unzip somewhere. It runs fine from there * with argouml.bat, you just don't get a start menu entry added.
EDIT: Your PATH must be correct to find the java.exe, easy way to check is to open a new Cmd shell (Start > Run... > cmd) and type java -version you should get something back from the jvm
Check if JAVA_HOME environment variable is set (it should contain the directory your JRE is installed to).
I have the same problem on WIN7_X64.
I have installed it manually, here some steps:
Download the argouml-0.34 zip file
Extract the archive to install_dir Ex: C:\Program Files (x86)\ArgoUML-0.34 (to make it visible for all users)
Create a shortcut ArgoUML in C:\ProgramData\Microsoft\Windows\Start Menu\Programs with the following information:
Target: "install_dir\argouml.jar" Ex: "C:\Program Files (x86)\ArgoUML-0.34\argouml.jar"
Start in: "install_dir" Ex: "C:\Program Files (x86)\ArgoUML-0.34"
Change Icon...: browse to install_dir\ArgoUML.ico Ex: C:\Program Files (x86)\ArgoUML-0.34\ArgoUML.ico
You ca use argouml.bat but the above steps are more than enough.
I installed windows x64 first but it didn't work.
Then I installed windows x86 offline and it worked.
Simple!
First install 86 bit jre(Windows x86 Offline) from oracle.com then try to install ArgoUML.I think it will work.It has worked for me.Try to download from below given links for jre and ArgoUML.
jre link-
https://www.oracle.com/java/technologies/javase-jre8-downloads.html
ArgoUML link-
https://argouml.en.softonic.com/download
I was able to use installer by first installing Java x86/32 bit JRE
First install the jre-8u271-windows-x641.exe
Install argouml
Uninstall the jre-8u271-windows-x641.exe
Move to the folder: C: \ Users \ nameuser \ AppData \ Roaming \ Microsoft \ Windows \ Start Menu \ Programs \ ArgoUML right-click on ArgoUML then property under target: "C: \ Program Files \ Java \ jdk-15 \ bin \ javaw.exe "-Xms64m -Xmx512m -jar" C: \ Program Files (x86) \ ArgoUML \ argouml.jar "specify the bin path of your jdk me mine is C: \ Program Files \ Java \ jdk- 15 \ bin \ javaw.exe
Execute the file (double click) .bat: C: \ Program Files (x86) \ ArgoUML \ argouml.bat
Is there a way to convert a Java application into a Mac OS X executable app?
I use NetBeans to develop in Java, and I'd like to "pack" the "dist" folder into an app (just for convenience)
Use the Apple Java Extensions and its Guide
The Apple Java Extensions contains a very complete development guide with information on the deployment of Java applications on Mac OS X and the production of application bundles. It also introduces other aspects of the Apple Java Extensions, like the support for integration with the standard Mac OS X UI.
Other references:
JarBundler.
Make a Mac OS X App Bundle
Creating a osx app bundle in Java registered to a protocol url
There is a library that let's you package your Java app
Packr: https://github.com/libgdx/packr
Packages your JAR, assets and a JVM for distribution on Windows (ZIP), Linux (ZIP) and Mac OS X (.app), adding a native executable file to make it appear like the app is a native app.
It can even minimize the JRE for you.
jar2app
Packr is a great tool, but at the time I found that I wanted something "easier to use", so jar2app was born. I know this is an old question but perhaps other people might find this program easier to use than other alternatives. If they don't, there's a direct reference in the FAQ to other alternatives (such as Packr).
You can use javapackager tool to build the application and wrap it in into an installer, the following commands show how to convert a jar file into a bundle file:
commands
mkdir -p package/macosx
cp Test.icns package/macosx
jdk=$(/usr/libexec/java_home)
$jdk/bin/javapackager -deploy -native dmg \
-srcfiles Test.jar -appclass package.Test -name Test \
-outdir deploy -outfile Test -v
cp deploy/bundles/Test-1.0.dmg installer.dmg
ls -l
open installer.dmg
To change the application icon and more info MacJava.
As of JDK14 there is also 📦 jpackage (JEP-392), currently promoted from incubation phase to a production-ready feature.
Example usage that worked with an swt app (assumes all the required jar files reside in the files folder; you can also provide a custom resource folder with --resource-dir):
jpackage --type dmg \
-i files \
-n Bigly \
--main-class com.biglybt.ui.Main \
--main-jar BiglyBT.jar \
--java-options -XstartOnFirstThread \
--mac-package-name BiglyBt \
--icon app.icns \
--verbose
For the full option list use:
jpackage --help
WARNING: It's probably debatable whether it's a bug or not, and maybe it will be addressed in a future release, but in the current version, if you specify the input folder as -i ., and do not provide a custom destination with --dest then jpackage will bundle everything in the current folder... including the bundle it just created, i.e. it goes recursive on itself when . is both the input folder and the output :D .
Since some of the links in the accepted answer are no longer available or suitable in 2020, 8 years from the question was asked, I would like to share my findings that I confirmed working today.
There is a tool, javapackager, shipped with java, can package java application on Windows, Linux, macOS for you.
Here is the official manual: https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html
(Also there are other helpful tools here: https://docs.oracle.com/javase/8/docs/technotes/tools/ )
For packaging a mac application, I used this command:
javapackager \
-deploy \
-native image \
-srcdir ./csv-encrypt-tool-mac \
-srcfiles csv-encrypt-tool.jar \
-srcfiles dict \
-srcfiles config \
-srcfiles log \
-outdir ./dist \
-outfile csv-encrypt-tool \
-appclass some.package.CsvEncToolApp \
-name "csv-encrypt-tool" \
-title "csv-encrypt-tool" \
-nosign \
-v \
-BjvmOptions=-Xmx4096m \
-BmainJar=csv-encrypt-tool.jar \
-Bicon=icon.icns
And this is the explanation:
-deploy \ # Assembles the application package for redistribution with sys JRE
-native image \ # Build a .app file. If you want a .dmg, use -native dmg
-srcdir ./csv-encrypt-tool-mac \ # directory where my jar and resource files in
-srcfiles csv-encrypt-tool.jar \ # my executable jar, path relative to -srcdir
-srcfiles dict \ # one of my resource directories, path relative to -srcdir
-srcfiles config \ # another one of my resource directories, path relative to -srcdir
-srcfiles log \ # again, one of my resource directories, path relative to -srcdir
-outdir ./dist \ # where I want the package to be put
-outfile csv-encrypt-tool \ # the output file name without extension, the final file (or bundle which is a directory actually) will be csv-encrypt-tool.app
-appclass some.package.CsvEncToolApp \ # the class with main method, which is the entry point of the whole app
-name "csv-encrypt-tool" \ # the name (not very sure what this is for)
-title "csv-encrypt-tool" \ # the title (not sure what it is either)
-nosign \ # not sign the app since this is just an internal tool, if you want to publish it, signing is necessary
-v \ # verbose
-BjvmOptions=-Xmx4096m \ # I need 4GB max heap size
-BmainJar=csv-encrypt-tool.jar \ # the jar file with main class
-Bicon=icon.icns # the icon
After the command is executed, there will be some files and directories created in dist, where I want the package be, and one of the directories is bundles. The application is put in there.
Since I just built an internal tool, there is no need to sign and packaged without other production ready options. You can refer to the official manual for help.
Hope this help others who do not know how to package an application on macOS in 2020, just like me.
So none of these options worked for me (maybe because I am running OS X 10.15, maybe because most of these projects are years old, who knows). Installing Catalina made the existing app I had built around the Java app no longer work.
Ultimately, this post helped: Just use Automator to run a script that runs the java command to launch the jar. I wanted to make an app to launch Colossus, a Java version of the old Avalon Hill board game Titan. I wrote a shell script that looks like:java -Xmx256m -jar /my/path/to/the/game/Colossus.jar net.sf.colossus.appmain.Start and then created an automator application whose only action was "Run Shell Script" that launches that script. Works like a charm, no installing Ant, no command line apps requiring you to download java vms, and best of all it uses an Apple tool so will work with newer versions of OS X.
You can try this app , it bundles your jar file into Mac app
Edit: it's easy to use , select the Jar file and an Icon. Here you can see the screen shoot.
https://github.com/aprsn/Mac-App-Creator