Solved

Using java code in .Net/c#: namespace issue

Posted on 2016-08-13
3
66 Views
Last Modified: 2016-08-14
Hello.

I'd like to reuse serveral java libs I wrote from within C# programs. For this purpose, I converted several jars to dlls using ikvmc.
After adding "using" directives to my c# sources, I faced an error, complaining that "is" is a keyword.  The reason: One of my Java namespaces contains "is", e.g. "my.namespace.is.not.ok" -> c# does not accept "is" as part of a namespace.

Question: is there a workaround allowing me to still keep the Java namespaces? If not, is there another solution than just altering the Java code?

Thank you,
Johann
0
Comment
Question by:Johann2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 41755146
Not sure if it works for namespaces, but try prefixing "is" with an @:

e.g.

System.@Is.Something
1
 

Author Comment

by:Johann2
ID: 41755367
..yes, it works! Perfect! Thank you very much for your help. :)
Regards,
Johann
0
 

Author Closing Comment

by:Johann2
ID: 41755369
Cool! Safes me a lot of work. :)
0

Featured Post

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question