BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 12-09-2005, 11:39 AM   #21
rcjr
New Member
 
rcjr's Avatar
 
Join Date: Dec 2005
Model: 7520
Carrier: sprint
Posts: 6
Default batch for creating alx file

Please Login to Remove!

I wrote a batch file that will allow you to create the cod and alx files from a java midlet. Remember to save your .jad and .jar files to the same directory.

Here is the text of the batch file, just copy and paste the text into notepad and save as yourfilename.bat then run the batch file and bingo you have your .cod, .jad, .jar, and .alx files all in the same folder. This will allow you to load the program to your blackberry using the blackberry desktop manager instead of using loader.exe then when you run the application loader it will recognize the program and you shouldn't have to re-install it.

@echo off
cls

:: get jde location
set jde=
set /p jde=what is the complete path to your Blackberry JDE directory?
echo.

:: get jad and jar locations
set sve=
set /p sve=enter the complete path where your jad and jar files are located:
echo.

:: get the name of the jad and jar files
set jar=
set /p jar=what is the name of your jar file?
echo.

:: copy jad and jar files to the jde directory
xcopy "%sve%\%jar%.jad" "%jde%\bin\"
xcopy "%sve%\%jar%.jar" "%jde%\bin\"

::create the cod files
cd /d "%jde%/bin"
pause
rapc import="%jde%\lib\net_rim_api.jar" codename=%jar% -midlet jad=%jar%.jad %jar%.jar
pause

:: move the cod file to the jad and jar directory
move "%jde%\bin\%jar%.*" "%sve%\"
pause


:: change to the new directory
cd /d %sve%

:: create the new alx file

echo ^<loader version="1.0"^> >%jar%.alx
echo ^<application id="%jar%"^> >>%jar%.alx
echo ^<name^>%jar%^</name^> >>%jar%.alx
echo ^<description^>%jar%^</description^> >>%jar%.alx
echo ^<version^> ^</version^> >>%jar%.alx
echo ^<vendor^> ^</vendor^> >>%jar%.alx
echo ^<copyright^> ^</copyright^> >>%jar%.alx
echo ^<fileset Java="1.0"^> >>%jar%.alx
echo ^<files^>%jar%.cod^</files^> >>%jar%.alx
echo ^</fileset^> >>%jar%.alx
echo ^</application^> >>%jar%.alx
echo ^</loader^> >>%jar%.alx
pause

:end

NOTE: with this batch file you DO NOT need to copy your .jad and .jar files to the same directory as your Blackberry JDE files.


I hopt this helps anyone who is not comfortable with using dos commands or who would just like to use desktop manager to install midlets.
__________________
PIN: 400743DF
Offline  
Old 01-13-2006, 12:28 AM   #22
Kordo
New Member
 
Join Date: Jan 2006
Model: 7290
Posts: 3
Default

Thx for the bat file. I seem to get the alx file created but it does not seem to create a cod file. Should the bat file also create a cod file?

Cheers.
Offline  
Old 01-16-2006, 08:35 PM   #23
VR6
Talking BlackBerry Encyclopedia
 
VR6's Avatar
 
Join Date: Dec 2004
Location: Canada
Model: 9800
Carrier: Rogers
Posts: 308
Default

what does this error mean?

c:\Program Files\Research in Motion\Blackberry JDE 4.0.2\bin\fantasywarrior.jar
a.class): Error!: Duplicate definition for 'a' found in: a

bad .jar file? bad jad file?
__________________
~VR6

Rogers 7280 -> 7100r -> 8310 -> 9000 -> 9800 -> 9900
Offline  
Old 01-16-2006, 10:40 PM   #24
KonTiki
BlackBerry Extraordinaire
 
KonTiki's Avatar
 
Join Date: Jun 2005
Location: NJ, USA
Model: 9650
OS: 6.0.0.524
PIN: 007
Carrier: Verizon
Posts: 2,762
Default

Unless you type the name of the path correctly when it asks for it it will not create the cod file. I started by just cutting and pasting the path by going to the directory where it is installed in and copying the address from the address bar. Then I realized that if I edited the bat file and pasted the path right in it and saved it that I would not have to do that anymore. So I took out the line that said:"set /p jde=what is the complete path to your Blackberry JDE directory? ", and put the path to the jde on line :"set jde="


Now when I run the bat file all it asks me for is the location for the jar and jad files, and then the na,e of the jar file, it works like a charm. By doing this you will only need to answer only two questions rather than three.

Quote:
Originally Posted by Kordo
Thx for the bat file. I seem to get the alx file created but it does not seem to create a cod file. Should the bat file also create a cod file?

Cheers.
__________________
BB Tour 9650


Running OS 6.0.0.524
Offline  
Old 05-09-2006, 02:29 AM   #25
eric0668
CrackBerry Addict
 
eric0668's Avatar
 
Join Date: Feb 2006
Location: Maryland
Model: 8705g
Carrier: T-Mobile
Posts: 514
Default jad jar game download

I saw a game(s) on the java site...downloaded the poker game jad then jar. It said it was the same, I supposed by name. But will they both work? I know the jar does now. I don't need the jar correct? Can I normally pick either or is one preferred

(something must be wrong...or I picked the wrong one out of jad or jar because with this one Poker game, it says hit 0 for sound, I do that and nothing happens. I have tried with numlock on and off. Do I have to have keyboard sound on?)

Last edited by eric0668; 05-09-2006 at 02:47 AM..
Offline  
Old 07-26-2006, 12:19 PM   #26
Aqualung
Knows Where the Search Button Is
 
Join Date: Sep 2005
Model: 8700c
Carrier: Cingular
Posts: 46
Default

Quote:
Originally Posted by hmss007
How about doing the reverse, I have a .cod/.alx file that I need to install over-the-air. I do not have desktop manager installed and my company doesn't want us to install it.

So, how can I get these files installed OTA?

Thanks
Does anyone know if this can be done? I too would like to do this as my company doesn't allow 3rd party apps to be installed via the DT Mgr....but I can via OTA. I have some apps I'd love to get on my 8700c, especially one that I've paid for as part of a bundle.
Offline  
Old 07-27-2006, 10:29 AM   #27
qc_metal
CrackBerry Addict
 
qc_metal's Avatar
 
Join Date: Mar 2005
Location: Rockford, IL
Model: 9530
OS: 4.7.x
Carrier: Verizon
Posts: 590
Default

Quote:
Originally Posted by VR6
what does this error mean?

c:\Program Files\Research in Motion\Blackberry JDE 4.0.2\bin\fantasywarrior.jar
a.class): Error!: Duplicate definition for 'a' found in: a

bad .jar file? bad jad file?
I saw this too - anyone have a reason why this is?

Rob
__________________
Provision, maintain, and report on users via web: the NEW BerryStats | FAQ
Offline  
Old 07-27-2006, 11:34 AM   #28
qc_metal
CrackBerry Addict
 
qc_metal's Avatar
 
Join Date: Mar 2005
Location: Rockford, IL
Model: 9530
OS: 4.7.x
Carrier: Verizon
Posts: 590
Default

Another question - if I have a .jad file from Mobile Google Maps (version 1.3.0), how could I deploy this if I don't have a .jar file? This would be the .jad file you can download from Googles mobile maps service online.

I sent a support request through Google, but this is a question I think that doesn't necessarily revolve around GMaps specifically.

Rob
__________________
Provision, maintain, and report on users via web: the NEW BerryStats | FAQ
Offline  
Old 10-01-2006, 02:46 PM   #29
burn out
New Member
 
Join Date: Sep 2006
Model: 7290
Posts: 2
Default

thank you soo much , may i add something?


for those of you getting the .jar file and only having this extension and needing the .jad file also to convert , i recommend JADMaker for Nokia Java Games
Version 1.15
for Windows 9x/NT/2K/ME/XP



i picked up this up , it made the needed .jad file to use this procedure and i successfully after using the tutorial listed got some much needed apps to work!
thanks again ya'll,you guys really made my day!



Kent C
Offline  
Old 10-23-2006, 01:28 PM   #30
mrsmokey
Thumbs Must Hurt
 
Join Date: Oct 2006
Model: 8100
Carrier: TMobile
Posts: 152
Default

I'm wondering if there is a newer, easier way to do this? (searched and came up empty)

I have many J2Me(Java) Apps on my computer, that I had on my old Nextel and I would like to put on my new TMo Pearl 8100

I really am not very educated in DOS and always run into trouble.

Is there anyway to send the .jad/.jar files OTA to my Pearl? from my hard drive of course?
Offline  
Old 10-27-2006, 06:31 PM   #31
sicilian_style
New Member
 
Join Date: Oct 2006
Model: 7100g
Posts: 4
Default

hey I am having a big problem trying to use change my .jar files to .cod and using the dos way of javaloader command.....i have been trying for the whole day lol

Can anyone maybe be nice enough if they have the free time to just add me onto the msn messenger and maybe just walk me through the process..it would be greatly appreciated! thanks to whoever can..
Offline  
Old 11-13-2006, 07:46 AM   #32
strumpet
New Member
 
Join Date: Nov 2006
Model: 7270
Posts: 1
Default

This is great, thanks for the batch files, especially the one that makes ALX files.
Since we are all downloading the Blackberry JDE, we could all do what's been asked here.

It will take jad and jar files and create COD, as well as ALX, and it will also let you extract the jad and jar from a cod. As for downloading OTA, you need to set up a server that can be accessed from the BB's browser, or place the jad/jar on an existing server.

You may not be able to use the desktop manager at your work computer, but install it on a home, or other computer. Or use the javaloader.
Offline  
Old 01-11-2007, 08:22 PM   #33
canonis
Thumbs Must Hurt
 
canonis's Avatar
 
Join Date: Dec 2006
Model: 8100
Carrier: Cingular
Posts: 59
Question

Thanks for the batch file. I'm able to run it on a single .jar file but I am looking to execute this batch file on an entire directory of .jar and .jad files.

Can some script savvy guru out there please modify the batch file to loop over the directory of files?

Please?
Offline  
Old 01-30-2007, 11:58 AM   #34
dmac67
New Member
 
Join Date: Jan 2007
Location: Broomfield CO
Model: 8330
Carrier: Verizon
Posts: 1
Default Javaload errors out

I get the following error when trying to push the cod file: C:\Program Files\Research In Motion\BlackBerry JDE 4.2.0\bin>javaloader.exe -usb
load f:\bb\sudokumaster.cod
RIM Wireless Handheld Java Loader
Copyright 2001-2006 Research In Motion Limited
Connecting to device...debug: HRESULT error during Open: 80040154
Error: unable to open port

Any suggestions?
Offline  
Old 02-13-2007, 02:28 AM   #35
isarib
Thumbs Must Hurt
 
Join Date: Jun 2005
Location: Australia
Model: 9700
Carrier: Telstra
Posts: 113
Default Javaloader: Error: Invalid Signature

Hi,

I have converted talkonaut.jar/.jad into .cod using the above steps with rapc.exe. When I load the .cod file using javaloader I get the error below...

Any ideas?

Thanks

javaloader -usb load talkonaut.cod
RIM Wireless handheld Java Loader
Copyright blah...
Connecting device....
Connected
Loading talkonaut ****Error: Invalid Signature
0 bytes sent at ~0bps
Disconnected
__________________
Regards
Imaz

9800 | 9700 | 8110 | 8100 | 8700g | 7100v | 7290
Offline  
Old 02-21-2007, 05:33 AM   #36
Yomodo
New Member
 
Join Date: Nov 2006
Model: 8700
Carrier: developer
Posts: 10
Default

Quote:
Originally Posted by dmac67
I get the following error when trying to push the cod file: C:\Program Files\Research In Motion\BlackBerry JDE 4.2.0\bin>javaloader.exe -usb
load f:\bb\sudokumaster.cod
RIM Wireless Handheld Java Loader
Copyright 2001-2006 Research In Motion Limited
Connecting to device...debug: HRESULT error during Open: 80040154
Error: unable to open port

Any suggestions?
Hi dmac67

I have the same problem. Please let me know if you resolve it.
Offline  
Old 02-24-2007, 04:39 PM   #37
K_T
Knows Where the Search Button Is
 
Join Date: Feb 2007
Model: Pearl
Carrier: TMO
Posts: 19
Default

I have a question. I have been able to convert the files using this batch file. But one thing I have came across is that sometimes the games, etc just come with a .jar file no .jad. Is there a way to convert this? I have read that BB can run jar files and j2me but the onese I have downloaded only have that one .jar file.
Offline  
Old 02-27-2007, 04:56 AM   #38
Yomodo
New Member
 
Join Date: Nov 2006
Model: 8700
Carrier: developer
Posts: 10
Default

Quote:
Originally Posted by dmac67
I get the following error when trying to push the cod file: C:\Program Files\Research In Motion\BlackBerry JDE 4.2.0\bin>javaloader.exe -usb
load f:\bb\sudokumaster.cod
RIM Wireless Handheld Java Loader
Copyright 2001-2006 Research In Motion Limited
Connecting to device...debug: HRESULT error during Open: 80040154
Error: unable to open port

Any suggestions?
I've installed "BlackBerry Desktop Software" and it hellped, now everything works
Offline  
Old 03-04-2007, 07:03 PM   #39
b_d0za
Talking BlackBerry Encyclopedia
 
Join Date: Mar 2007
Model: 8100
Carrier: T-Mobile
Posts: 239
Default Uninstall?

Thanks for the great info but is there a way to uninstall after using this method? They won't come up in my application loader or anything.

Nevermind....I found it in this same page. I was just too quick with the draw.
Thanks again for all the great info good work!!

Last edited by b_d0za; 03-04-2007 at 07:06 PM..
Offline  
Old 03-28-2007, 08:40 AM   #40
michaeli98
New Member
 
Join Date: Oct 2006
Model: 7105t
Carrier: T-Mobile
Posts: 1
Default

I was able to convert some .jad and .jar files into .cod and .alx Installation on BB 7105t goes without a hitch, but none of the converted applications work. Every time they would either compe up with outofmemoryerror or an unknown class.
I used Java SDK 1.5 and BB JDE 4.2.1
Did anyone come across the same problem?
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


1PCS KE721K03 Electronic Components  IGBT Module Electronic picture

1PCS KE721K03 Electronic Components IGBT Module Electronic

$81.00



1PCS MDD255-16N1 IGBT Module picture

1PCS MDD255-16N1 IGBT Module

$75.00



1PCS 2MBI400TB-060 IGBT Module picture

1PCS 2MBI400TB-060 IGBT Module

$77.00



1PCS MCC312-16IO1 IGBT Module picture

1PCS MCC312-16IO1 IGBT Module

$75.00



Portable 600pc 15Value NPN PNP Transistor TO-92 Assortment Kit Set /Box Hot picture

Portable 600pc 15Value NPN PNP Transistor TO-92 Assortment Kit Set /Box Hot

$11.16



MOSFET - IRFZ44N 55V - Transistor  for Arduino Pi  TTL picture

MOSFET - IRFZ44N 55V - Transistor for Arduino Pi TTL

$54.79







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.