Java Question Cant Compile Library

Discussion in 'Libraries developers questions' started by Marion Opperman, Sep 2, 2016.

  1. Marion Opperman

    Marion Opperman Member Licensed User

    I am getting "warning: no version field." and the Javadoc only has the below in it:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
        <doclet-version-
    NOT-library-version>1.02</doclet-version-NOT-library-version>
    </root>
    This is the full code of the library:
    Code:
    package co.za.geckcreate.JaaleeCalculateTemp;

    import anywheresoftware.b4a.BA.*;

    @ShortName(
    "JaleeCalc")
    @Author(
    "GeckoCreate")
    @Version(
    1.03f)

    class JaleeCalculateTemps {
    //     static long Major = 
    27698;
    //     static long Minor = 
    16394;
        
    private static float calcHumidity;   
        
    private static float calcTemperature;
        
    private static short ReallyMinor;
        
         
    public void Caculate(long Minor, long Major){
            short Humidity = (short) (Major & 
    0xFF00);
            short Temperature = (short) (((Major & 
    0x00FF) << 8) | ((Minor & 0xC000) >> 8));
            ReallyMinor = (short) (Minor & 
    0x03FF);

            calcHumidity = -
    6 + 125 * (Humidity / 65536.0f);
            calcTemperature = (float) (-
    46.85 + (175.72 * (Temperature / 65536.0f)));
        
         
    }

        public static float getCalcHumidity() {
            return calcHumidity;
        }

        public static void setCalcHumidity(float calcHumidity) {
            JaleeCalculateTemps.calcHumidity = calcHumidity;
        }

        public static float getCalcTemperature() {
            return calcTemperature;
        }

        public static void setCalcTemperature(float calcTemperature) {
            JaleeCalculateTemps.calcTemperature = calcTemperature;
        }

        public static short getReallyMinor() {
            return ReallyMinor;
        }

        public static void setReallyMinor(short reallyMinor) {
            ReallyMinor = reallyMinor;
        }
    }
    I can not get it to work with the SimpleCompile tool or Eclipse. Please help

    Thanks,
    Martin
     
  2. somed3v3loper

    somed3v3loper Well-Known Member Licensed User

    Your class is not public
    change it to
    Code:
    public class JaleeCalculateTemps
     
    giga likes this.
  3. Marion Opperman

    Marion Opperman Member Licensed User

    lol! thanks
     
  4. giga

    giga Well-Known Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice