You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Manuel

Administrator

  • "Manuel" is male
  • "Manuel" started this thread

Posts: 256

Date of registration: Jul 16th 2008

Location: Erlangen, Germany

Occupation: Software Developer

Hobbies: Jabaco, game theory, text-mining

  • Send private message

1

Wednesday, November 26th 2008, 1:54pm

Create a signed Jar-file

Java virtual machines run applets under a different security regime than applications. By default, applications are implicitly trusted. The designers of the JVM specification assumed that users start applications at their own initiative and can therefore take responsibility for the application's behavior on their machine. Such code is considered to be trusted. Applets, on the other hand, are started automatically by the browser after it downloads and displays a page. Users cannot be expected to know what applets a page might contain before they download it, and therefore cannot take responsibility for the applet's behavior on their machine. Applets, therefore, are considered by default to be untrusted. Among other restrictions, an applet cannot, by default, open a socket referred to by a URL who's domain different from the domain of the page that contains the applet. This is part of the security architecture that browsers employ to protect users' computing resources from malicious or faulty applets.

How to create a signed Jar

1. Use Jabaco to compile your application/applet to a Jar-file
2. Use the KeyTool in your JRE/JDK-Path to create your own public/private key pair.
Sample: keytool -genkey -alias myNewKey -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US"
3. Use the KeyTool to create a certificate for the key.
Sample: keytool -selfcert -alias myNewKey -validity 3650
4. Run JarSigner associate this certificate with the JAR file that contains your applet.
Sample: jarsigner myJar.jar myNewKey
5. Verify your signed Jar-File
Sample: jarsigner -verify -verbose -certs myJar.jar

Java: http://java.sun.com/javase/6/docs/techno…r/jarGuide.html

frankp

Beginner

Posts: 14

Date of registration: Jan 12th 2009

  • Send private message

2

Monday, January 19th 2009, 2:22pm

RE: Create a signed Jar-file


Butn where can I find jarsigner???

Cheers,

Frank

A1880

Intermediate

  • "A1880" is male

Posts: 500

Date of registration: Jan 1st 2009

Location: Hanover, Germany

Occupation: Software Engineer

Hobbies: Hilbert Curves

  • Send private message

3

Monday, January 19th 2009, 4:42pm

Jarsigner is part of the Java Development Kit (JDK)

Google is your friend!

Google

Jarsigner is part of the Java Development Kit (JDK).
The Java Runtime Environment (JRE) lacks tools like jarsigner.

Happy experimenting

A1880

Sbleck

Beginner

  • "Sbleck" is male

Posts: 13

Date of registration: May 29th 2010

Location: Santos, Brazil

Occupation: Consultant

Hobbies: Builing some apps for accessing databases and some automation processes

  • Send private message

4

Friday, June 4th 2010, 2:01am

Is there any other info to install .JAR files into Mobile phones that run Java ?

Hello,

I tried these steps but wasn´t the case for uploading .JAR files made with Jabaco to mobile phones, like Nokia E71.

Wanted to know if another person had found some way to build a correct .JAD file and what changes should be made to the MANIFEST.MF file too, to be possible to upload these .JAR files to Nokia mobile phones. I tried these combinations (mentioned below) but currently the only problem I´m having is that some missing option wasn´t available to complete the installation:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
- HelloWorld.JAD (for example): 

Manifest-Version: 1.0.0 
MIDlet-Vendor:Someone 
MIDlet-Name:HelloWorld - 1.0.0 
MIDlet-Version: 2.0.0 
MicroEdition-Configuration: CLDC-1.1 
MIDlet-1: HelloWorld, Jabaco 
MIDlet-Description:: Developed using JABACO Ver. 1.5.2 
MIDlet-Info-URL: http://www.jabaco.org 
MIDlet-Data-Size: 100 
MIDlet-Icon: Hello.png 
MicroEdition-Profile: MIDP-2.0


Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- MANIFEST.MN (from inside the HelloWorld.JAR): 

Manifest-Version: 1.0.0 
MIDlet-Vendor:Someone 
MIDlet-Name:HelloWorld- 1.0.0 
MIDlet-Version: 1.0.0 
MIDlet-1: HelloWorld, Jabaco 
MicroEdition-Configuration: CLDC-1.0 
MIDlet-Jar-Size: 531341 
MIDlet-Jar-URL: HelloWorld.jar 
MIDlet-Info-URL: http://www.jabaco.org 
MIDlet-Icon: Hello.png 
MIDlet-Data-Size: 100 
MicroEdition-Profile: MIDP-2.0 
MIDlet-Description:: Developed using JABACO Ver. 1.5.2


Is there any way to put these info in the build process ? Only to not having to manipulate these .JAR files using other tools...

Any advice and colaboration would be greatly appreciated, too.

Regards,

Sven

This post has been edited 1 times, last edit by "Sbleck" (Jun 4th 2010, 2:18am)


Rate this thread
WoltLab Burning Board