Link to home
Start Free TrialLog in
Avatar of TheMeeser
TheMeeser

asked on

Problem with building Bluetooth project

I get this error when I try and build my project.

C:\School\Year4\Tech Project\Programs\Bluetooth\FuelFinderBT.java:91: constant expression required
            case SERVER_PORT: {
                 ^
1 error
Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d C:\DOCUME~1\Chris\LOCALS~1\Temp\rapc_53dd4af3.dir -bootclass ...

I can't figure out what it means. I even re wrote it to match a smaple from that comes with JDE 4.1

This is the code that has the error:

switch(id)
        {
            case SERVER_PORT: {
                //Push a new SPPScreen onto the display stack and pop the existing menu
                pushScreen( new SPPScreen(null) );
                popScreen(myScreen);
                return;
            }
           
            default:
                if( cookie instanceof Runnable ) {
                   ((Runnable)cookie).run();
                }
            break;
        }

How can I fix this problem?
ASKER CERTIFIED SOLUTION
Avatar of bglodde
bglodde
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TheMeeser
TheMeeser

ASKER

Thank you. I did not realize that the SERVER_PORT had to have final in it.