JAR Files so far

16 views
Skip to first unread message

Thore Sittly

unread,
Jun 30, 2011, 3:45:40 PM6/30/11
to jam...@googlegroups.com
Hello

I added some Code to load simple jar Files by using the parameter -jar.
I don't know if hierarchical packed jars will work at this moment, as I didn't support Manifest for now, but it's planned.
For this I just have to made the jar file Handling in main.c and tweak the zip decoder in jnienv.c which was broken. I corrected it. Nice prework! The thoughts were going into the right direction.

As soon as I included manifest support and folder hierarchie I will send this to the official release.

Maybe I can do this this weekend.

The files will not be extracted to a folder, but loaded into a RAM buffer and be handled like normal class loading. After it, the VM doesn't care if the file was a real file or if it was streamed out of a jar.
Oh and btw.... jar loading seems to be fast :)

Kind regards and happy programming ;)



--
NEU: FreePhone - kostenlos mobil telefonieren!
Jetzt informieren: http://www.gmx.net/de/go/freephone

Thore Sittly

unread,
Jul 2, 2011, 1:40:48 PM7/2/11
to jam...@googlegroups.com
I added Manifest loading of Main-Class and Class-Path but it's not tested well.
I created a simple HalloWorld.jar which class is HelloWorld.class, and this works.
Need to have more test files with jar, not only self created, but "living code out there".

-------- Original-Nachricht --------
Datum: Thu, 30 Jun 2011 21:45:40 +0200
Von: "Thore Sittly" <TSi...@gmx.de>
An: jam...@googlegroups.com
Betreff: JAR Files so far




--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

Thore Sittly

unread,
Jul 3, 2011, 5:52:45 AM7/3/11
to jam...@googlegroups.com
Hello

I implemented code, which can load jar files, even if you compress the classpath to classes.jar, you can use it. Just have to alter the classpath ENV to the jar File (Unix path style not working yet, but Amiga style works)

so not only the -jar switch works, but "usual" classpathes in a zip file will also work.

For jar Files, Manifest Loading of Main-Class and Class-Path is implemented as well, so it will find the right classes.

As soon I remember by account password, I will check it in.

Regards

Thore

-------- Original-Nachricht --------
> Datum: Thu, 30 Jun 2011 21:45:40 +0200
> Von: "Thore Sittly" <TSi...@gmx.de>
> An: jam...@googlegroups.com
> Betreff: JAR Files so far

> Hello

--

Thore Sittly

unread,
Jul 7, 2011, 3:18:43 PM7/7/11
to jam...@googlegroups.com
Hello

I fixed some code for jar loading (unix style paths) in jni.c and main.c
Unfortunately, I cannot upload sources yet,how can I add as member?

-------- Original-Nachricht --------
Datum: Sun, 03 Jul 2011 11:52:45 +0200


Von: "Thore Sittly" <TSi...@gmx.de>
An: jam...@googlegroups.com

Betreff: Re: JAR Files so far

Joakim Nordström

unread,
Jul 7, 2011, 3:29:46 PM7/7/11
to jam...@googlegroups.com
Hi,

I have to add you to the Google Code page, and for that I need your Google account name. I.e. something like tsi...@gmail.com. Google says it can't find user tsi...@gmx.de.

/Joakim

2011/7/7 Thore Sittly <TSi...@gmx.de>

Thore Sittly

unread,
Jul 7, 2011, 4:40:11 PM7/7/11
to jam...@googlegroups.com
try dert...@gmail.com

-------- Original-Nachricht --------
Datum: Thu, 7 Jul 2011 21:29:46 +0200
Von: "Joakim Nordström" <joakim.n...@gmail.com>

Joakim Nordström

unread,
Jul 8, 2011, 3:18:31 AM7/8/11
to jam...@googlegroups.com
Es hat geklappt! :)

You're now part of the project. Look on the "Source" tab to find the generated Google  Code code.

Thore Sittly

unread,
Jul 8, 2011, 2:22:39 PM7/8/11
to jam...@googlegroups.com
Hello

Can you guide me how to add my code? :) Thank you
I made a few bug fixes for jar loading and found a bad memory bug in my code which I corrected.

Thore
-------- Original-Nachricht --------
> Datum: Fri, 8 Jul 2011 09:18:31 +0200


> Von: "Joakim Nordström" <joakim.n...@gmail.com>
> An: jam...@googlegroups.com
> Betreff: Re: JAR Files so far

> Es hat geklappt! :)
>
> You're now part of the project. Look on the "Source" tab to find the
> generated Google Code code.
>
> /Joakim
>
> 2011/7/7 Thore Sittly <TSi...@gmx.de>
>
> > try dert...@gmail.com
> >
> > -------- Original-Nachricht --------
> > Datum: Thu, 7 Jul 2011 21:29:46 +0200
> > Von: "Joakim Nordström" <joakim.n...@gmail.com>
> >
> > An: jam...@googlegroups.com
> > Betreff: Re: JAR Files so far
> >
> > Hi,
> >
> > I have to add you to the Google Code page, and for that I need your
> Google
> > account name. I.e. something like

> tsi...@gmail.com<https://service.gmx.net/de/cgi/g.fcgi/mail/new?CUSTOMERNO=13669372&t=de751457890.1310065885.a0de6d42&to=tsittly%40gmail.com>.


> > Google says it can't find user

> tsi...@gmx.de<https://service.gmx.net/de/cgi/g.fcgi/mail/new?CUSTOMERNO=13669372&t=de751457890.1310065885.a0de6d42&to=tsittly%40gmx.de>


> > .
> >
> > /Joakim
> >
> > 2011/7/7 Thore Sittly

> <TSi...@gmx.de<https://service.gmx.net/de/cgi/g.fcgi/mail/new?CUSTOMERNO=13669372&t=de751457890.1310065885.a0de6d42&to=TSittly%40gmx.de>


> > >
> >
> >> Hello
> >>
> >> I fixed some code for jar loading (unix style paths) in jni.c and
> main.c
> >> Unfortunately, I cannot upload sources yet,how can I add as member?
> >>
> >> -------- Original-Nachricht --------
> >> Datum: Sun, 03 Jul 2011 11:52:45 +0200
> >>
> >> Von: "Thore Sittly"

> <TSi...@gmx.de<https://service.gmx.net/de/cgi/g.fcgi/mail/new?CUSTOMERNO=13669372&t=de751457890.1310065885.a0de6d42&to=TSittly%40gmx.de>
> >> >
> >> An:
> jam...@googlegroups.com<https://service.gmx.net/de/cgi/g.fcgi/mail/new?CUSTOMERNO=13669372&t=de751457890.1310065885.a0de6d42&to=jamiga2%40googlegroups.com>


> >> Betreff: Re: JAR Files so far
> >>
> >>
> >>
> >> Hello
> >>
> >> I implemented code, which can load jar files, even if you compress the
> >> classpath to classes.jar, you can use it. Just have to alter the
> classpath
> >> ENV to the jar File (Unix path style not working yet, but Amiga style
> works)
> >>
> >> so not only the -jar switch works, but "usual" classpathes in a zip
> file
> >> will also work.
> >>
> >> For jar Files, Manifest Loading of Main-Class and Class-Path is
> >> implemented as well, so it will find the right classes.
> >>
> >> As soon I remember by account password, I will check it in.
> >>
> >> Regards
> >>
> >> Thore
> >>
> >> -------- Original-Nachricht --------
> >> > Datum: Thu, 30 Jun 2011 21:45:40 +0200
> >> > Von: "Thore Sittly"

> <TSi...@gmx.de<https://service.gmx.net/de/cgi/g.fcgi/mail/new?CUSTOMERNO=13669372&t=de751457890.1310065885.a0de6d42&to=TSittly%40gmx.de>
> >> >
> >> > An:
> jam...@googlegroups.com<https://service.gmx.net/de/cgi/g.fcgi/mail/new?CUSTOMERNO=13669372&t=de751457890.1310065885.a0de6d42&to=jamiga2%40googlegroups.com>

Joakim Nordström

unread,
Jul 10, 2011, 3:25:28 AM7/10/11
to jam...@googlegroups.com
Hi,

I am currently thinking of the best way to organize our SVN, so merging and branching is made simple. I will create a wiki-page for it during the day.

/Joakim

2011/7/8 Thore Sittly <TSi...@gmx.de>

Thore Sittly

unread,
Jul 10, 2011, 8:08:58 AM7/10/11
to jam...@googlegroups.com
That's good, so my fixed MorphOS Thread part can also be checked in, I haven't seen my first changes in the source yet :) Just to remember that nothing will be lost, and the result is a crashing JAmiga on MorphOS ;)

-------- Original-Nachricht --------
Datum: Sun, 10 Jul 2011 09:25:28 +0200

Joakim Nordström

unread,
Jul 10, 2011, 11:47:13 AM7/10/11
to jam...@googlegroups.com
I've added a short document describing how to do your own branch. I'd suggest you start with that.

http://code.google.com/p/jamiga2/wiki/BranchingAndMerging

Before committing anything, please make sure you're in your branch,

When you have everything in your branch, your branch should be merged with the stuff currently in trunk. I usually use nice GUI:s for SVN, but I haven't seen anyone for Amiga, so I'm a bit lost when it comes to actually merging branches to trunk, and how to use the svn tool. 

But basically you make sure your branch has all changes made to the trunk, and then simply switch from branch to trunk. Then you perform your commits to the trunk.


/Joakim

2011/7/10 Thore Sittly <TSi...@gmx.de>

Thore Sittly

unread,
Jul 10, 2011, 12:02:16 PM7/10/11
to jam...@googlegroups.com
As I do the cp stuff, svn says "sh: nano not found" svn: system('nano svn-commit.tmp')

Do I have nano installed on my MorphOS machine?

-------- Original-Nachricht --------
Datum: Sun, 10 Jul 2011 17:47:13 +0200

Thore Sittly

unread,
Jul 10, 2011, 12:29:34 PM7/10/11
to jam...@googlegroups.com
Installed a correct nano version and it copied it.
Now I have problems to switch to my branch.
When I do:
svn switch https://jamiga2.googlecode.com/svn/branches/R201_JAmiga_MOS
it sais:
svn: 'http://jamiga2.googlecode.com/svn/trunk'
is not the same repository as
'https://jamiga2.googlecode.com/svn'

Maybe I make something wrong...

-------- Original-Nachricht --------
Datum: Sun, 10 Jul 2011 18:02:16 +0200
Von: "Thore Sittly" <TSi...@gmx.de>

Thore Sittly

unread,
Jul 10, 2011, 12:49:23 PM7/10/11
to jam...@googlegroups.com
switching with http instead https might work.
But I cannot check in with "svn commit":
Method not allowed.

Do you know what I make wrong?

-------- Original-Nachricht --------
Datum: Sun, 10 Jul 2011 18:29:34 +0200

Thore Sittly

unread,
Jul 10, 2011, 2:16:39 PM7/10/11
to jam...@googlegroups.com
I changed my code manually with the internet source editor.
Hope I haven't forget anything.

-------- Original-Nachricht --------
Datum: Sun, 10 Jul 2011 18:49:23 +0200

Joakim Nordström

unread,
Jul 10, 2011, 6:15:50 PM7/10/11
to jam...@googlegroups.com

Wow. Changing the code manually through the web interface -- that must have been a pain. Hopefully you'll get your SVN running ok. What SVN version  do you have on MOS? On OS4 we have 1.1.5, and I read that SVN doesn't cope very well/easy with merges until 1.5.

I will try to see if I can merge your branch to the trunk. But time is lacking -- I thought I would have gotten more work done today... 

Regarding the svn commit -- have you logged in? Or perhaps you have to check out your branch again, logged in, using the parameter --username. I remember it being difficult to check out anonymously, and then trying to commit as a user.

Regarding nano, I believe SVN reads some ENV-variable in order to find the preffered editor.

Oh, and btw, I see we have different tab sizes... I believe it is 4 spaces for tabs on most places, so I have that aswell. Its easier to read if all code is indented the same. See wiki-page for more guide lines: http://code.google.com/p/jamiga2/wiki/GuidelinesForDevelopers

Anyways, great to see some work being done! We should probably think of making an official release for MorphOS and AmigaOS 3 and 4. Just to let people know that work is being done.

Thore Sittly

unread,
Jul 11, 2011, 4:17:23 AM7/11/11
to jam...@googlegroups.com
Release sounds good :)
Can you also test jar file support on OS4 before doing that? I used the LibZip from Aminet which works really fine on MorphOS.

Btw: Libmsg cannot be compiled on MorphOS because of the Printfs. I will make compatible code which works for all.

Regards

-------- Original-Nachricht --------
Datum: Mon, 11 Jul 2011 00:15:50 +0200

Joakim Nordström

unread,
Jul 11, 2011, 9:17:48 AM7/11/11
to jam...@googlegroups.com
I experimented with libZip, but the OS4 version is compiled with newlib, and JAmiga uses CLIB, and you can't combine those two C runtime libraries. I am thinking of removing clib dependecies from JAmiga altogether, although I'm not certain that will allow us to use libZip anyway.

Regarding Printf's -- perhaps we should use out own define for Printfs -- like JA_PRINTF -- so its easily swapped between our different flavours. Actually, most Printfs should be cahnged to LOG_DEBUG/_INFO already. I thought I had replaced them all, but perhaps not in the libraries (perhaps that was an issue with unopened DOS-library or non-available C runtime (CLIB)).

What I'm saying: replace the Printfs that should print out messages to the user (I doubt there are any) with a new JA_PRINTF define, and use LOG_DEBUG for log messages.

/Joakim

2011/7/11 Thore Sittly <TSi...@gmx.de>
Reply all
Reply to author
Forward
0 new messages