Make your own free website on Tripod.com

Java MIDP/ CLDC Jad auto updater ("MIDlet-Jar-Size: ")

Updates your Java MIDP - mobile/ wireless jad file everytime you build.
Free software as-is, no warranty GNU licence. Get the java Jad Updater exe JavaJadUpdtrP.exe
Usage:
Pass it param to the Java MIDP JAD File, it read it till "MIDlet-Jar-Size: " inserts the matching jar files size and then writes the file to a temp file.
It then renames the new file to the old.
if you choose back-up (by passing paramater 2 as "backup" case insensitive) then it makes a back up called xyz.jad.backUp
If you want the Java version email me tgkprog at g mail ...

Installation

It needs the VB runtime plus the exe JavaJadUpdtrP.exe. Most PCs have the VB runtime. If not you can get it from the MS site at vb run time at MS, its about 1 MB
Step 1: download JavaJadUpdtrP.exe.
Step 2: Save it to a folder, keeping note of that folder.
Step 3: Run the exe. If runs you are good to go. Else get the runtime from vb run time at MS it has directions
Step 4: try running the utility again. It should run once you have installed VB (might have to re start you system after installing it.)

VB6 Source

Sub main in a module :
Option Explicit

Sub Main()
On Local Error GoTo errH
Dim sLoc As String
Dim fso As FileSystemObject
Dim txIn As TextStream
Dim txOt As TextStream
Dim args, i, s, f1 As File
args = Split(Command, " ")
Set fso = New FileSystemObject
Set txIn = fso.OpenTextFile(args(0), ForReading)
Set txOt = fso.OpenTextFile(args(0) & "outTmp", ForWriting, True)
Set f1 = fso.GetFile(Left(args(0), Len(args(0)) - 3) & "jar")

'"MIDlet-Jar-Size: "
Do While Not txIn.AtEndOfStream
s = txIn.ReadLine
i = InStr(1, s, "MIDlet-Jar-Size: ")
If i > 0 Then
s = "MIDlet-Jar-Size: " & f1.Size
End If
txOt.WriteLine s
Loop
txIn.Close
txOt.Close
If UBound(args) > 0 Then
If LCase(args(1)) = "backup" Then
Call fso.CopyFile(args(0), args(0) & ".backUp", True)
End If
End If
Call fso.CopyFile(args(0) & "outTmp", args(0), True)
fso.DeleteFile args(0) & "outTmp"
Err.Clear
If Err.Number <> 0 Then
errH:
MsgBox "Err " & Err.Number & " " & Err.Description & vbNewLine & sLoc
Resume Next
End If
End Sub

There is a form too - just to get the icon no code , never called.



Help with research, genitics, history. Volunteer your computer www.worldcommunitygrid.org today!
Click: www.thehungersite.com , and www.bhookh.com , feed a hungry soul, its free.
Please add these to your start-up how to - http://tusharkapila.blogspot.com/2007/07/when-i-think-all-of-100000s-of.html

tk.celladmin.com      Exercise timer      Blackie      Blog      BaghBan      Savandurga      bone setters      123... a game      Cows and bulls game      images 2002       Kanyakumari and Kovalum  
    New Look       My help pages      Who moved my cheese      My family and me      Programming      EDC meet june 7 2000      forwards , puzzles and info in Bangalore 
    Picnic Dec. 2000      kudremukh trek      cows      Patty pnt       My log      Hognekal & EDC      Poetry 
    all forwards      all forwards      at work      Neat DHTML Needs IE      Meditation technique      MENSA quiz 
Forum Ads by google:










- Tushar G Kapila
Bangalore India 2007 ©