Here is what I have found out.. Im including some code snippits so we can collobarate on this. Lets make a script to facilitate the process. but if you in a huge hurry just place the .JAR on a www server and browse to the .JAR with the BlackBerry Browser and download the >JAR to the phone. There will be the possibilty that itll get removed by the Desktop Manager since there is not .JAD or .ALX *shrug* dunno
First.. If you only have a .JAR then youll need to create a .JAD file, there are several .EXE's out there, im using ..
http://www.geocities.com/mangokun/jadmaker/jadmaker.htm
I have found a sample .vbs that has sompossibility.. needs tweaking !
' -- Begin VBS--
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
'se preia directorul aplicatiei
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
'MsgBox(WScript.ScriptFullName)
Set fs = CreateObject("Scripting.FileSystemObject")
'MsgBox (WshShell.CurrentDirectory)
Set f = fs.GetFolder(WshShell.CurrentDirectory)
Set fc = f.Files
For Each f1 In fc
If InStr(f1.Name, ".jar") Then
numeFisier = f1.Name
WshShell.Run "unzip -jo " & numeFisier & " META-INF/MANIFEST.MF", 1, true
numeFisier1 = Replace(numeFisier, ".jar", ".jad")
Set inFile = fs.GetFile(WshShell.CurrentDirectory & "\MANIFEST.MF")
Set inf = inFile.OpenAsTextStream(ForReading, TristateUseDefault)
' MyString = inf.ReadAll
fs.CreateTextFile WshShell.CurrentDirectory & "\" & numeFisier1, True
Set outFile = fs.GetFile(WshShell.CurrentDirectory & "\" & numeFisier1)
Set outf = outFile.OpenAsTextStream(ForWriting, TristateUseDefault)
MyString1=""
Do While Not inf.AtEndOfStream
MyString = inf.ReadLine
If instr(MyString,"Manifest-Version") Then
ElseIf instr(MyString,"Go-Bible-") Then
MyString1 = MyString1 & vbCrLf & MyString
ElseIf instr(MyString,":") = 0 Then
ElseIf Len(MyString) = 0 Then
Else
outf.WriteLine MyString
End If
Loop
outf.WriteLine("MIDlet-Jar-URL: " & numeFisier)
outf.Write("MIDlet-Jar-Size: " & f1.size)
outf.Write MyString1
inf.Close
outf.Close
End If
Next
' MsgBox "cmd /K del " & Chr(34) & WshShell.CurrentDirectory & "\MANIFEST.MF" & Chr(34)
' WshShell.Run Chr(34) & "del " & WshShell.CurrentDirectory & "\MANIFEST.MF" & Chr(34) , 1, true
' fs.DeleteFile(WshShell.CurrentDirectory & "\MANIFEST.MF")
Set WshShell = Nothing
' -- End VBS--
I hate running a .EXE from some unknown person so I am going to make a .vbs that will create the .JAR / .ALX and .COD
then use this .bat file I found..
-- Begin BAT
@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
-- End BAT