Skip to main content



      Home
Home » Modeling » Epsilon » How to import java libraries to .eol files?
How to import java libraries to .eol files? [message #1866753] Thu, 06 June 2024 08:23 Go to next message
Eclipse UserFriend
Hi,

I'm trying to import java libraries to get some user input or work with dates but I get the error 'Importing java.util.Scanner is not supported in this language'. The same error applies to java.util.Date. How can I import them in a project?

import 'java.util.Scanner';
import 'java.util.Date';

operation Passenger hello() : String {


 return('Hello world');
}
Re: How to import java libraries to .eol files? [message #1866756 is a reply to message #1866753] Thu, 06 June 2024 08:28 Go to previous message
Eclipse UserFriend
Hi Fatma,

You can achieve this using EOL's Native type as shown below:

var dateFormat = new Native("java.text.SimpleDateFormat")("MM-dd-yyyy");
dateFormat.format(new Native("java.util.Date")).println();


Thanks,
Dimitris
Previous Topic:Data retrieval from models through Java and EOL
Next Topic:Issue with protected region since Eclipse 2024-03
Goto Forum:
  


Current Time: Fri Oct 31 19:14:07 EDT 2025

Powered by FUDForum. Page generated in 0.04417 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top