1 / 3
Nov 2013

I'd a problem with JavaScript (TEST problem)

importPackage(java.io);
importPackage(java.lang);
S = new BufferedReader( new InputStreamReader(System['in']) );
s = true;
s = S.readLine();
while (s != '42'){
print(s);
s = S.readLine();
}

I have Compilation Error. What's wrong with this code?!

  • created

    Nov '13
  • last reply

    Sep '14
  • 2

    replies

  • 725

    views

  • 3

    users

  • 1

    link

Hi,

although I do not have any experience nor knowledge in javascript I was able to correct your code within 5 minutes. All I did was seaching this forum and comparing sample code with your code.

Did you look at any sample solution for TEST in javascript?

Usually, clicking on the compilation error will show the details of an error for compiled languages. This appears to be different for javascript, but the result of this action still gives a good hint for the condition missing in your code wink

10 months later

The error is usually seen with a small window while trying to Launch.

Close all the browser Windows before you perform the below steps:

Solution 1

Click Start
Control Panel
Double click on "Java" Icon (alternatively in Run Window,  ten type command: javaws -viewer)
Do you have the Java Control Panel Opened
Click the Network Settings Button
Select Direct connection
Click on apply and OK

Now, try to Launch the Java Application and check the Syntax Error.

Solution 2

The other solution is to uncheck the Use_Automatic_Script_Configuration in Lan Settings in Internet Explorer

Open Internet Explorer
Click on Tools-->Internet Options
Go To Connections TAB

These two solutions should definitely fix/resolve the issue related to compilation error. Hope this helpful!


IT Company in Lucknow